↑ ↓ to move ↵ to open

Web Crawling API

Crawl a whole site and get every page as Markdown.

At a glance

Endpoint ID
web.crawl
Price
1 credit per call; failed calls are free
Runs for up to
120 seconds
Request
POST /crawl or POST /execute
MCP tool when pinned
web__crawl
Pin tools
OpenAPI
openapi.json
Download

The Web Crawling API starts at one page, follows its links across the same site and returns every page it reaches as Markdown. Use it to load a documentation site into a search index, or to read a whole site at once.

Call it

curl https://data.upscrape.com/crawl \  -H "Authorization: Bearer $UPSCRAPE_API_KEY" \  -H "Content-Type: application/json" \  -H "Prefer: wait=30" \  -d '{"url": "https://docs.stripe.com/payments", "max_pages": 10}'

Each page in results[0].data.pages has its url, title, depth and full markdown. From a run on staging on 16 October 2026:

Output
https://docs.stripe.com/payments Payments | Stripe Documentationhttps://docs.stripe.com/ Stripe Documentationhttps://docs.stripe.com/get-started Get started | Stripe Documentationhttps://docs.stripe.com/revenue Revenue | Stripe Documentationhttps://docs.stripe.com/risk Risk | Stripe Documentation…

A crawl of many pages can take more than 30 seconds. The call then answers 202 and you fetch the job when it's done; Long-running calls has a loop that uses this same crawl.

Shape the crawl

InputWhat it does
max_pagesPages to fetch in this call, up to 100. 10 by default.
max_depthHow many links away from the start page to go, up to 10. 2 by default.
include_patterns, exclude_patternsOnly follow, or never follow, URLs that match, such as "path:/docs/*".
include_subdomainsAlso crawl other subdomains of the same site, such as docs. and blog..
respect_robotsOn by default: follow the site's robots.txt.
delay_msA pause between requests to the site, up to 5 seconds.

Crawl in parts

completion_reason says why it stopped: every page reached, or the max_pages you set. When there is more, the response includes a continuation_token: send it back with the same options and the crawl carries on where it stopped, without repeating pages.

A very large crawl

delivery: "hosted" returns the pages as a file to download, instead of inside the JSON, when there is too much for one response. auto, the default, chooses for you.

Input

FieldTypeRequiredWhat it doesExample
url string yes The page to start from. https://docs.stripe.com/payments
accept_statuses array<integer> no Error statuses you still want returned, such as [404], to inspect the page.
ai string no Rank the documents found by how relevant they are to your instructions. Nothing is removed. never · auto · always
allow_browser_fallback boolean no Open the page in a real browser when it needs JavaScript or blocks a plain request. On by default.
allow_truncated boolean no Return what was read when a page is larger than the size limit, instead of failing.
concurrency integer no How many pages to fetch at once.
continuation_token string no Pass the token from the last response, with the same options, to continue a crawl.
delay_ms integer no A pause between requests, in milliseconds, to go easy on the site.
delivery string no How large results come back: auto, inline, or as a download link for very large crawls. auto · inline · hosted
detail string no summary for titles and counts only; standard or full for each page's text and Markdown. summary · standard · full
document object no Options for PDFs and other files found on the way.
exclude_patterns array<string> no Leave out URLs matching these patterns.
include_patterns array<string> no Only URLs matching these patterns, such as path:/blog/* or contains:pricing.
include_subdomains boolean no Also follow other subdomains of the same site, such as docs. and blog.
instructions string no With ai, which documents you care about.
max_body_bytes integer no The largest page or file to read, in bytes.
max_depth integer no How many links away from the start page to go.
max_pages integer no The most pages to fetch in this call. 10
max_total_bytes integer no The most bytes to read in all, redirects included.
respect_robots boolean no Follow the site's robots.txt rules. On by default.

Response

A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.

This is results[0].data from a real run:

results[0].data
{  "completion_reason": "page_limit",  "final_url": "https://docs.stripe.com/payments",  "traversal_complete": false,  "pages": [    {      "title": "Payments | Stripe Documentation",      "content_type": "text/html; charset=utf-8",      "depth": 0,      "description": "Use Stripe to start accepting payments.",      "final_url": "https://docs.stripe.com/payments",      "language": "en-US",      "markdown": "# Payments | Stripe Documentation\n\nPayments\n\n## Use Stripe to start accepting payments.\n\nGet started\n\nIntegrate with Stripe to start accept…",      "rendered": false,      "status_code": 200,      "url": "https://docs.stripe.com/payments"    },    {      "title": "Stripe Documentation",      "content_type": "text/html; charset=utf-8",      "depth": 1,      "description": "Explore our guides and examples to integrate Stripe.",      "final_url": "https://docs.stripe.com/",      "language": "en-US",      "markdown": "# Stripe Documentation\n\n![](https://b.stripecdn.com/docs-statics-srv/assets/52d6e32f24e1d2872960ba1d0cb8aac5.webp)\n\n[Sign in](https://dashb…",      "parent_url": "https://docs.stripe.com/payments",      "rendered": false,      "status_code": 200,      "url": "https://docs.stripe.com/"    }  ]}

Fields

FieldTypeWhat it isExample
pages[].title string The page's title. Payments | Stripe Documentation
pages[].url string The page's address. https://docs.stripe.com/payments
pages[].depth integer How many links away from the start page this page is. 0
pages[].description string The page's description for search engines. Use Stripe to start accepting payments.
pages[].language string The page's language. en-US
pages[].content_type string The kind of content the page is. text/html; charset=utf-8
pages[].final_url string The address the page ended at, after any redirects. https://docs.stripe.com/payments
pages[].markdown string The page's text as Markdown. # Payments | Stripe Documentation Payments ## Use Stripe to sta…
pages[].rendered boolean Whether the page was opened in a browser before reading. false
pages[].status_code integer The site's HTTP status for the page, such as 200. 200
completion_reason string Why the crawl stopped, such as reaching the page limit. page_limit
final_url string The address the page ended at, after any redirects. https://docs.stripe.com/payments
pages array The pages found. 10 records
traversal_complete boolean Whether every reachable page was visited. false

What to know

  • It stays on the site you start from and follows its robots.txt.
  • Each page comes back with its Markdown, so one call gives you the text of up to max_pages pages.
  • completion_reason says why it stopped: every page reached, or the page limit you set.
  • A crawl of many pages can take longer than 30 seconds; fetch the job when it finishes.

If a call fails

A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.

Something missing or unclear? Ask the team that builds the endpoints.