Web web Crawl API
Crawl a website and scrape its pages as markdown. Call the Web web Crawl API for JSON. From 1 credit per call. Every call returns the same flat shape.
Request
url is required.
Response
If successful, the response body contains the standard envelope.data contains pagesRead, results and cursor.
The following example is a real response, truncated: each list shows one item and long strings are cut.
Optional parameters
Billing
A successful request consumes 1 credit a page for most pages, 2 or 3 credits when a page takes more work to load, and 15 credits for the hardest pages to reach. A page that cannot be read costs nothing. Each call reads up to 4 pages, up to 60 credits. Requests that fail, or that return no items, are not billed.Pagination
Results are paginated. To retrieve the next page, pass the value ofdata.cursor as cursor in a subsequent request. A response that omits cursor is the last page.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Cut every text value in the response to this many characters. A value that was cut ends with …, and a page whose text was cut has isTruncated set to true. A screenshot is never cut. Leave it out to get the full text.
x >= 1Body
The page to start from, such as https://bun.com/docs.
What you are looking for, such as sqlite performance. Pages about it are read first, and the crawl stops once new pages stop mentioning it.
1 - 300Read only pages whose path matches one of these, such as /blog/*.
201 - 200Skip pages whose path matches one of these, such as /tag/*.
201 - 200How many links away from the start page to go.
1 <= x <= 10Stop after reading this many pages in total, across every call.
1 <= x <= 1000Read the whole site, not only pages under the start page's path.
Also read pages on subdomains, such as docs.bun.com for bun.com.
Keep only each page's main content, without menus, headers and footers.
The cursor from the previous response. Send it as is.
1