Scrape URLs into structured records in one call
brightdata.web.scrape.structuredScrape one or more URLs into structured records and get them back in the same call
- Price
- $0.0015/resultAl precio del proveedor
- Success rate
- 84,4 %Last 30 days · 38 calls
- Latency p50
- 60 sp95 61 s
- Last verified
- 28 jul 2026Verified working
POSThttps://toolswitch.dev/v1/tools/brightdata.web.scrape.structured?format=json&dataset_id=gd_l1vikfch901nx3by4Preview- Uses platform quota
- Synchronous response
- Reads public data
Parámetros
the API reference documents the body as {input: [...]}, while the quickstarts post a bare array [{url: …}] to the same path — both appear in official docs, so treat the array as the payload and the wrapper as optional until verified. HARD 1-minute timeout: past that the call returns HTTP 202 with a snapshot_id and you must collect the rows from brightdata.web.scrape.job.results instead. Use trigger/progress/snapshot for anything beyond a few URLs
| Parámetro | Tipo | Obligatorio | Descripción | Ejemplo |
|---|---|---|---|---|
| Parámetros de consulta | ||||
format | cadena | Opcional | json (default) | ndjson | csv | json |
dataset_id | cadena | Obligatorio | which managed scraper to run — it decides both the site and the output columns. List them with brightdata.account.datasets.list | gd_l1vikfch901nx3by4 |
include_errors | booleano | Opcional | adds a per-input error report to the output | |
custom_output_fields | cadena | Opcional | pipe-separated field list to trim the response | url|about.updated_on |
- Parámetros de consulta
formatcadenaOpcionaljson (default) | ndjson | csv
Ejemplo:
jsondataset_idcadenaObligatoriowhich managed scraper to run — it decides both the site and the output columns. List them with brightdata.account.datasets.list
Ejemplo:
gd_l1vikfch901nx3by4include_errorsbooleanoOpcionaladds a per-input error report to the output
custom_output_fieldscadenaOpcionalpipe-separated field list to trim the response
Ejemplo:
url|about.updated_on
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
curl -X POST 'https://toolswitch.dev/v1/tools/brightdata.web.scrape.structured?format=json&dataset_id=gd_l1vikfch901nx3by4' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '[{"url":"https://www.instagram.com/instagram"}]'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/brightdata.web.scrape.structured?format=json&dataset_id=gd_l1vikfch901nx3by4",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("[{\"url\":\"https://www.instagram.com/instagram\"}]"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/brightdata.web.scrape.structured?format=json&dataset_id=gd_l1vikfch901nx3by4", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("[{\"url\":\"https://www.instagram.com/instagram\"}]")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a $0.0015/result, incluida la tarifa de servicio.