The TASK_URL_READER function fetches content from a specified URL and places the result in a designated cell. This function is useful for importing web content directly into your spreadsheet for analysis, processing, or reference.
=TASK_URL_READER(header, url, [return_format], [use_cache], [celladdress])
Parameter | Data Type | Required | Description |
---|---|---|---|
header | string | Yes | Column header for the task template |
url | string | Yes | The URL whose content to fetch (e.g., "https://www.example.com") |
return_format | string | No | The format to return the page content in: "default", "text", "html", "markdown", or "screenshot" (defaults to "default") |
use_cache | boolean | No | Whether to use cache to load/save the result (defaults to true) |
celladdress | string | No | The cell address to place the result (e.g., "C1"). If not specified, the cell to the right of the function cell is used |
The return_format
parameter allows you to control how the content is retrieved and formatted:
The use_cache
parameter controls whether previously fetched content is reused:
true
(default), responses are cached for 6 hours to improve performancefalse
when you need to ensure you're getting the most up-to-date contentThe celladdress
parameter lets you control where the fetched content is placed:
Fetch the content of a webpage and convert it to markdown:
=TASK_URL_READER("Web Content", "https://www.example.com", "markdown")
Take a screenshot of a website and place it in a specific cell:
=TASK_URL_READER("Screenshot", "https://www.google.com", "screenshot", true, "D5")
Ensure you get the latest content without using the cache:
=TASK_URL_READER("Stock Data", "https://finance-site.com/stock/AAPL", "text", false)
Retrieve the raw HTML from a webpage for further processing:
=TASK_URL_READER("Raw HTML", "https://developer.mozilla.org", "html")
use_cache=true
) to improve performance and reduce API usageuse_cache=false
when you need the most current version of a frequently updated websiteCause: The URL provided is not properly formatted or is empty.
Solution: Ensure the URL includes the full protocol (http:// or https://) and is properly formatted.
Cause: The URL may be behind a login, blocked, or inaccessible.
Solution: Verify the URL is publicly accessible and doesn't require authentication.
Cause: The webpage content exceeds the 32,760 character limit.
Solution: Consider fetching specific parts of the page or using a more targeted URL.
Cause: The webpage took too long to load or process.
Solution: Try a different return format or check if the website is responding slowly.
Cause: The specified cell address is not in the correct format.
Solution: Use proper A1 notation (e.g., "C1") or leave blank to use the default behavior.
Cause: You're seeing old content due to caching.
Solution: Set use_cache=false
to fetch fresh content.
The function will show "Running..." while it's executing. When complete, the result will appear in the target cell. For large pages or slow connections, this may take a few seconds.
No, TASK_URL_READER can only access publicly available content that doesn't require authentication.
The function has a limit of 32,760 characters. If the content exceeds this limit, it will be truncated with "..." at the end.
If you see "Error:" followed by a message, it indicates a problem with fetching the URL. Check that the URL is valid, publicly accessible, and that you have an active internet connection.
While there's no strict limit, it's good practice to limit refreshes to once every few minutes to avoid overloading either your sheet or the target website.
Yes, you can set up a time-driven trigger that runs a script to execute the TASK_URL_READER functions in your sheet. This requires creating a custom script that calls the RUN_CELL function.
Most websites should work, but some may block automated access or require specific headers that the function doesn't provide.
The function returns the entire webpage content. For more selective extraction, you may need to use TASK_LM or TASK_ROW_UPDATE with a prompt to extract specific information from the fetched content.
When using return_format="screenshot", the service renders the webpage and returns a visual representation. This is useful for capturing the visual state of a website.
The function uses r.jina.ai as a proxy service to fetch and format web content, which enables features like markdown conversion and screenshots.
1 week ago