Prerequisites
- A Bright Data account with an active API key
- Completed the Quickstart
Request structure
Every synchronous request follows the same pattern:url and an optional country. The Fetch API has one endpoint, so the dataset_id is always gd_m6gjtfmeh43we6cqc.
The
/scrape endpoint is built for real-time requests. Bright Data recommends 20 URLs or fewer per request, a best practice rather than a hard limit, and the endpoint waits up to 1 minute. If collection takes longer, the response is HTTP 202 with a snapshot_id instead of data, and collection continues asynchronously. Fetch the result with async requests or have it pushed to you with webhook delivery.How to fetch a web page by URL
Dataset ID:gd_m6gjtfmeh43we6cqc
200 response with one record holding markdown, html2text, page_html, page_title and final_url. Processing time varies with target-site conditions.
Example response
Example response
How to fetch a page from a specific country
Addcountry to an input object to fetch the page from that country. Use a two-letter country code. This request fetches the Google home page from Germany and from the United States:
Example response
Example response
markdown values are trimmed, and html2text and page_html are left out here.Send the country code in uppercase, for example
US or DE. With a lowercase code such as de the page is still fetched from that country, but the country field in the record comes back null.How to return only some fields
Set thecustom_output_fields query parameter to a pipe-separated list of field names. This request returns only the URL, title and Markdown:
Example response
Example response
page_html keeps responses small when you only need text for an LLM.
How to fetch many URLs asynchronously
Send the same body to/trigger instead of /scrape. The Fetch API returns a snapshot_id right away and fetches the pages in the background:
Example response
Example response
snapshot_id, as described in async requests.
Quick reference
All four use dataset ID
gd_m6gjtfmeh43we6cqc.
Output formats
Control the response format with theformat query parameter:
These are the
format values for /scrape. The full list, NDJSON (default), JSON, JSON lines, CSV and Parquet, and where each applies is in output formats.
Related
Async batch requests
Fetch hundreds of URLs in a single batch job.
API reference
Full parameter and response field reference.