The TASK_URL_READER
function allows you to fetch and display content from any website directly in your Google Sheets. It pulls information from a specified URL and places the result in a designated cell, making it easy to incorporate web data into your spreadsheets without manual copying and pasting. This function uses the Jina reader service, which offers a free plan with rate limitations and a paid plan for higher volume needs.
TASK_LM
) for processing.TASK_URL_READER
(url, [return_format], [use_cache], [celladdress])
Parameter | Data Type | Required | Description |
---|---|---|---|
url | string |
Required | The web address of the page you want to extract (e.g., "https://www.example.com") |
return_format | string |
Optional | How you want the content formatted. Options include "default" , "text" , "html" , "markdown" , "screenshot" |
use_cache | boolean |
Optional | Whether to save and reuse previous results (default: true ) |
celladdress | string |
Optional | Where to place the output (e.g., "C1"). If not specified, results appear in the cell to the right of the function |
"text"
)Returns just the readable text from the webpage with minimal formatting:
=TASK_URL_READER("https://www.example.com", "text")
This is ideal when you only need the raw text content without any HTML tags or formatting.
"html"
)Returns the complete HTML code of the webpage:
=TASK_URL_READER("https://www.example.com", "html")
Use this when you need to analyze the page structure or extract specific HTML elements.
"markdown"
)Converts the webpage content to markdown formatting:
=TASK_URL_READER("https://www.example.com", "markdown")
This preserves basic formatting like headings, lists, and links in a clean, readable format.
"screenshot"
)Returns a URL to a screenshot image of the webpage:
=TASK_URL_READER("https://www.example.com", "screenshot")
The screenshot option is particularly useful when:
When combined with TASK_LM
, you can use this to analyze visual content:
=TASK_LM("Describe what you see in this image: " & TASK_URL_READER("https://www.example.com", "screenshot"))
The cache system stores results for 6 hours to improve performance and reduce API calls:
=TASK_URL_READER("https://www.example.com", "default", true)
To always fetch fresh content, set use_cache
to false
:
=TASK_URL_READER("https://www.example.com", "default", false)
Use the Save icon in the sidebar for long-term storage of cached results across sessions.
By default, results appear in the cell to the right of the function. To specify a different output location:
=TASK_URL_READER("https://www.example.com", "default", true, "G10")
You can also specify just a column, and the function will use the current row:
=TASK_URL_READER("https://www.example.com", "default", true, "G")
=TASK_URL_READER("https://www.wikipedia.org")
This places Wikipedia's homepage content in the cell to the right of the formula.
=TASK_URL_READER("https://www.bbc.com/news/world-65360307", "text", true, "B5")
This extracts a BBC news article as plain text and places it in cell B5.
=TASK_URL_READER("https://www.amazon.com/dp/B08N5KWB9H", "markdown")
This fetches an Amazon product page in markdown format.
=TASK_URL_READER("https://developers.google.com/apps-script/reference/spreadsheet/sheet", "text", false)
This gets fresh (non-cached) Google Apps Script documentation as plain text.
=TASK_URL_READER("https://weather.com/weather/today/l/San+Francisco+CA", "screenshot")
This captures a screenshot of today's weather in San Francisco, which could then be analyzed by an AI model.
use_cache
set to true
for most cases to avoid unnecessary API calls.false
when you need real-time updates."text"
for simple content extraction."markdown"
when you need basic formatting preserved."html"
when you need to analyze page structure."screenshot"
when dealing with heavily JavaScript-dependent sites or when you need visual context.TASK_URL_READER
uses the Jina reader service which has rate limits on the free plan.TASK_URL_READER
's output as input for functions like TASK_LM
to analyze content.celladdress
parameter format is incorrect.The cache lasts for 6 hours by default. After that time, the function will fetch fresh content the next time it runs.
Generally no. The function cannot access content behind login screens or paywalls unless the site allows public access.
It depends. Some JavaScript-rendered content may not be captured in text/HTML modes. Try the "screenshot" mode for sites with heavy JavaScript components.
The caching mechanism minimizes performance impact. However, extracting large amounts of content from multiple URLs may cause some slowdown.
Yes, the Jina reader service has rate limitations on their free plan. For high-volume needs, consider their paid plan.
No, the function can only access publicly available content that doesn't require authentication.
Use the output cell from TASK_URL_READER
as input for TASK_LM
:
=TASK_LM("Summarize this article: " & B5)
(Assuming B5 contains the TASK_URL_READER
output)
Not directly. However, you can extract the full page and then use other functions like TASK_LM
to parse specific sections.
10 months ago
6 months ago
6 months ago