PeumeAPI

Web scraping

Fetch

Fetch up to 10 URLs and extract clean Markdown, HTML, or a JSON document tree.

$0.0015 per result

Call it

curl https://api.peume.com/v1/call/fetch \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "urls": []
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: fetch.

Parameters

urlsRequiredarray

1-10 http(s) URLs to fetch, processed in parallel. Private IPs, localhost, and cloud metadata endpoints are rejected. A failure on one URL never fails the batch — it appears in errors[] instead.

purposestring

Optional short statement of the task these results are for — the goal behind the request, not the request itself. uses it as an extra ranking signal. Example: 'Compare pricing tiers across vendors for a procurement report'. Max 2000 characters.

formatstring

Output format for each result's `text`. 'markdown' (default) is best for LLM consumption, 'html' returns cleaned semantic HTML, 'json' returns a structured document tree. All three are rendered from the same cleaned page, so none brings back the navigation or footer the cleaning removes — 'include_selectors' does (e.g. ['body']). 'markdown' escapes underscores, also inside JSON documents ('node_id' becomes 'node\_id'); 'html' and 'json' keep them.

markdown · html · json

linksboolean

Include every <a href> on the page as absolute URLs in the result's `links` array. Defaults to false.

image_linksboolean

Include every <img src> on the page as absolute URLs in the result's `image_links` array. Defaults to false.

ttlinteger

Cache freshness tolerance in seconds. Omit to accept any cached entry, 0 to force a live fetch, or a positive number to accept entries younger than that many seconds.

per_url_timeout_msinteger

Per-URL wall-clock budget in milliseconds (1-110000). A URL exceeding it returns a 'timeout' entry in errors[] while the rest of the batch still completes.

if_none_matchstring

An ETag saved from a prior fetch of this URL, forwarded verbatim as the If-None-Match request header. Single URL only. An unchanged page returns not_modified: true instead of a body.

if_modified_sincestring

A Last-Modified value saved from a prior fetch of this URL, forwarded verbatim as the If-Modified-Since request header. Single URL only.

include_etag_and_last_modifiedboolean

Return `etag` and `last_modified` on each result so they can be replayed as if_none_match / if_modified_since on a later call. Defaults to false. Fetch does not store them for you. Pair it with ttl=0: validators come from the origin, so a cached hit returns none.

include_selectorsarray

1-20 CSS selectors scoping extraction to elements matching ANY entry, concatenated in document order. Automatic boilerplate removal is bypassed. A partial miss still succeeds and reports unmatched_selectors; a total miss fails that URL with selector_not_matched plus candidate_selectors retry hints.

exclude_selectorsarray

1-20 CSS selectors for elements to remove BEFORE extraction, applied before include_selectors so it also prunes inside selected regions. Entries that match nothing are a no-op.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.