Extract product details
diffbot.x.extract-productExtracts product name, price, SKU, images, specs and reviews from an e-commerce page
- Price
- $0.001196/callAt provider cost
- Success rate
- 100%Last 30 days · 30 calls
- Latency p50
- 7.3 sp95 41 s
- Last verified
- Jul 28, 2026Verified working
GEThttps://toolswitch.dev/v1/tools/diffbot.x.extract-product?url=http%3A%2F%2Fbooks.toscrape.com%2Fcatalogue%2Fa-light-in-the-attic_1000%2Findex.htmlPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
different HOST than base_url — api.diffbot.com, not kg.diffbot.com. The docs' own example URL (a Micro Center SKU) is dead (403, then 404) — retargeted to books.toscrape.com, a stable public scraping sandbox
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
url | string | Required | target URL to extract | http://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html |
proxy | string | Optional | ||
fields | string | Optional | comma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb | |
scroll | string | Optional | 'slow' or 'fast' — triggers lazy-loaded content | |
timeout | integer | Optional | 30000 | |
callback | string | Optional | ||
useProxy | string | Optional | 'default' = datacenter proxy (2 credits/page); 'none' disables | |
proxyAuth | string | Optional | ||
discussion | boolean | Optional | pass false to disable automatic extraction of product reviews | true |
renderDelay | integer | Optional | extra rendering ms before DOM extraction, max 180000 | |
- Query parameters
urlstringRequiredtarget URL to extract
Example:
http://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.htmlproxystringOptionalfieldsstringOptionalcomma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb
scrollstringOptional'slow' or 'fast' — triggers lazy-loaded content
timeoutintegerOptionalExample:
30000callbackstringOptionaluseProxystringOptional'default' = datacenter proxy (2 credits/page); 'none' disables
proxyAuthstringOptionaldiscussionbooleanOptionalpass false to disable automatic extraction of product reviews
Example:
truerenderDelayintegerOptionalextra rendering ms before DOM extraction, max 180000
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
curl -X GET 'https://toolswitch.dev/v1/tools/diffbot.x.extract-product?url=http%3A%2F%2Fbooks.toscrape.com%2Fcatalogue%2Fa-light-in-the-attic_1000%2Findex.html' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/diffbot.x.extract-product?url=http%3A%2F%2Fbooks.toscrape.com%2Fcatalogue%2Fa-light-in-the-attic_1000%2Findex.html",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/diffbot.x.extract-product?url=http%3A%2F%2Fbooks.toscrape.com%2Fcatalogue%2Fa-light-in-the-attic_1000%2Findex.html", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.001196/call, including the service fee.