Fetch pages

by TinyFish

tinyfish/fetch

Fetch a batch of URLs and return clean page content.

Billed per
call
Price
$0.002
Provider
TinyFish
Timeout
5 min

Overview

Takes up to ten URLs in one request and returns readable page content as markdown, HTML, or structured JSON, along with page metadata such as title, description, language, author, and publication date. Extraction can be scoped with CSS selectors that either restrict it to part of a page or strip unwanted elements, and a plain-language statement of what the caller is after steers what gets prioritised. Results and per-URL errors come back separately, so one bad URL does not fail the batch.

One entry per URL with its title, metadata, and extracted content, and a separate list of URLs that failed.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
urlsarrayYesThe pages to fetch, up to 10.
formatstringNoHow to return the content.
purposestringNoWhat the content is for, in plain language, to steer extraction.
linksbooleanNoInclude every link found on the page.
ttlintegerNoHow stale a cached copy may be, in seconds.

Requests up to 1 MB.

Example

A call that works, with your own key.

curl https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"provider":"tinyfish","endpoint":"fetch","input":{"urls":["https://example.com"],"format":"markdown"}}'

Pricing

$0.002 per call on the default plan. Every run carries its price in the response.

Questions

Fetch pages — AgentSky