Fetch a page
fetch_pageFetch a web page's HTML in slices using offset and max_chars, returning the full length and next offset for pagination.
Instructions
Fetch a page's HTML, and say what it cost: plain HTTP or a browser.
url: an http(s) URL. Literal HTML is refused, since nothing would be fetched. offset: where in the HTML this answer starts, 0 for the beginning; the answer before gives the next as next_offset. max_chars: the most characters this answer carries, 1 to 60,000; fewer when more would weigh over 75,000 bytes, as 60,000 characters of Chinese do.
Returns {"ok", "html", "url", "fetch", "truncated", "length", "next_offset"}: html is one slice of the page, length the whole page's, and next_offset where the next slice starts, or null when this one reaches the end. Prefer extract_declared or page_markdown, which return what is in the page rather than all of it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | an http(s) URL. Literal HTML is refused, since nothing would be fetched. | |
| offset | No | where in the HTML this answer starts, 0 for the beginning; the answer before gives the next as next_offset. | |
| max_chars | No | the most characters this answer carries, 1 to 60,000; fewer when more would weigh over 75,000 bytes, as 60,000 characters of Chinese do. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| url | No | ||
| html | No | ||
| error | No | ||
| fetch | No | ||
| length | No | ||
| truncated | No | ||
| next_offset | No |