Skip to navigation

Scrape a page with ScrapingBee

View as Markdown

Relays to https://app.scrapingbee.com/api/v1/ with the secret api_key placed first in the query string. Controls also go in the query string. Client-sent api_key (query), Authorization, and X-API-KEY all get dropped.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Query parameters

urlstringRequiredformat: "uri"
URL of the page to scrape.
render_jsbooleanOptional

Have JavaScript rendered before the page comes back (ScrapingBee control).

Response

The upstream’s answer, relayed as-is. Typically the scraped page as HTML, raw bytes, or JSON under a structured/parsed mode. The upstream defines the exact shape.

Errors

401
Unauthorized Error
404
Not Found Error