Web Crawling API
Follow links from one page across a site and get every page's clean Markdown, with depth, scope patterns and robots.txt rules. Complete crawls run as one server-side job: 1 credit per successfully crawled page.
{ "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\n\n[Sign in](https://dashb…", "parent_url": "https://docs.stripe.com/payments", "rendered": false, "status_code": 200, "url": "https://docs.stripe.com/" } ]}
| # | Title | Content type | Depth | Description | Language | Markdown | Rendered | Status code | Final url | Parent url | Url |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Payments | Stripe Documentation | text/html; charset=utf-8 | 0 | Use Stripe to start accepting payments. | en-US | # Payments | Stripe Documentation Payments ## Use Stripe to sta… | false | 200 | https://docs.stripe.com/payments | https://docs.stripe.com/payments | |
| 2 | Stripe Documentation | text/html; charset=utf-8 | 1 | Explore our guides and examples to integrate Stripe. | en-US | # Stripe Documentation  by default and maximum. | |
| 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. | |
| max_total_pages | integer | no | With complete, the most pages the whole job may crawl: 10,000 by default and maximum. | |
| respect_robots | boolean | no | Follow the site's robots.txt rules. On by default. |
| Field | Type | What it is | Example |
|---|---|---|---|
| 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 this endpoint covers
- 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.
Call it from your code
Set UPSCRAPE_API_KEY to your key and copy a working request. No SDK needed.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "web.crawl", "input": { "max_pages": 10, "url": "https://docs.stripe.com/payments" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "web.crawl", "input": { "max_pages": 10, "url": "https://docs.stripe.com/payments" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "web.crawl", "input": { "max_pages": 10, "url": "https://docs.stripe.com/payments" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
{ "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\n\n[Sign in](https://dashb…", "parent_url": "https://docs.stripe.com/payments", "rendered": false, "status_code": 200, "url": "https://docs.stripe.com/" } ]}
The other website tools
The same API key runs every one of them.
Web Crawling API FAQ
The short answers. The docs have the long ones.
How much does the Web Crawling API cost?
1 credit per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send url. The input fields below list every option with its type and limits.
Which sites does it work on?
Any public page a visitor can open without logging in. A page that is blocked or gone fails with its reason.
Can my AI agent call it?
Yes, over MCP: the agent finds web.crawl, checks its price and runs it with the same credits as the REST API.