Bing and DuckDuckGo
Web results pages as typed JSON: every organic result with its position, title, URL, displayed URL and snippet.
Web results pages as typed JSON: every organic result with its position, title, URL, displayed URL and snippet.
At a glance
Both answer { endpoint, url, credits, duration_ms, data } with data in one shape (WebSearch): query, page, total_results (the engine's estimate, when it shows one) and results, each with position, title, url, displayed_url and snippet. Positions continue across pages. A page we could not read is 502 TARGET_FAILED and costs nothing.
Endpoint | Localised by | Typical |
|---|---|---|
|
| about 550,000 results per credit, 10 per page |
|
| about 3.3 million results per credit, about 10 per page |
Bing
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | The search terms. |
| integer |
| Results page, 1–100. |
| string |
| Two-letter country to search as. |
| string |
| Interface language, e.g. |
| string | — | A 5-digit US ZIP code. Results reflect that area (local prices, stock and nearby results). Unknown ZIP codes are a free 400. |
zip (a 5-digit US ZIP code) returns the page a searcher in that area would see, so local results (businesses, "near me" queries) follow it. It reflects the area around the ZIP code, not the exact spot. A localised page is bigger than a plain one and costs about four times as much, and can list fewer than ten organic results. An unknown ZIP code is a free 400.
- cURL
- Python
- Node.js
curl -G "https://api.scrapelyserp.com/v1/structured/bing/search" \
-H "Authorization: Bearer $SCRAPELY_API_KEY" \
--data-urlencode "query=web scraping api" \
-d country=usimport os
import requests
HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}
r = requests.get(
"https://api.scrapelyserp.com/v1/structured/bing/search",
headers=HEADERS,
params={"query": "web scraping api", "country": "us"},
timeout=30,
)
r.raise_for_status()
data = r.json()
for r in data["data"]["results"]:
print(r["position"], r["title"], r["url"])const res = await fetch(`https://api.scrapelyserp.com/v1/structured/bing/search?${new URLSearchParams({ query: 'web scraping api', country: 'us' })}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
for (const r of data.data.results) console.log(r.position, r.title, r.url);Full reference → GET /v1/structured/bing/search
DuckDuckGo
Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | The search terms. |
| integer |
| Results page, 1–5. A later page costs about as much as every page before it together. |
| string |
| Region and language, e.g. |
| string | — | A 5-digit US ZIP code. Results reflect that area (local prices, stock and nearby results). Unknown ZIP codes are a free 400. |
zip (a 5-digit US ZIP code) returns the page a searcher in that area would see, so local results (businesses, "near me" queries) follow it. It reflects the area around the ZIP code, not the exact spot. An unknown ZIP code is a free 400.
Ads are left out. Pages go up to 5; a later page takes as long, and costs about as much, as every page before it together.
Full reference → GET /v1/structured/duckduckgo/search