Skip to content
All docs

Scrape API

Request page content and metadata with POST /v1/scrape.

POST /v1/scrape fetches one public page and returns the formats you request. The endpoint requires a key with the scrape scope.

curl https://api.url2llm.com/v1/scrape \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","formats":["markdown","html","links"]}'

Request body

Field Type Default Purpose
url string Required Public page URL.
formats string[] ["markdown"] Outputs to return. See formats.
only_main_content boolean true Focus Markdown and cleaned HTML on the main content.
include_tags string[] Unset Keep selected DOM tags. Cannot be combined with exclude_tags.
exclude_tags string[] Unset Remove selected DOM tags.
timeout integer 30000 Request deadline in milliseconds, up to 120000.
max_age integer 3600000 Maximum age of a reusable cached result, in milliseconds. 0 forces a fetch.
min_age integer Unset Cache-only lookup; a miss returns 404.
store_in_cache boolean true Whether a new fetch can be saved for reuse.

Browser and network settings include mobile, location, headers, block_ads, and wait_for. See formats and options.

Response

The data.metadata object always reports source_url, final_url, status_code, from_cache, and credits_used. It can also report the page title, description, author, language, and publication date. Requested output fields are included when available. A Shopify fetch can also include shopify data.

html is cleaned content. rawHtml is the fetched HTML. A screenshot result is a public URL accessible to anyone who has it, so avoid requesting screenshots of pages containing sensitive information.

Cache and retries

Cached results can be reused when their age and captured outputs satisfy the request. A new screenshot or branding request may require a fresh fetch. max_age: 0 forces a new fetch. Use a unique Idempotency-Key header for a request you may retry, and do not reuse that key for different inputs. See quote and credits for billing behavior.