Extract product details
diffbot.x.extract-productExtracts product name, price, SKU, images, specs and reviews from an e-commerce page
- Price
- $0.001196/callプロバイダー原価
- Success rate
- 100%Last 30 days · 30 calls
- Latency p50
- 7.3 sp95 41 s
- Last verified
- 2026/07/28Verified 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
パラメータ
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
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
url | 文字列 | 必須 | target URL to extract | http://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html |
proxy | 文字列 | 任意 | ||
fields | 文字列 | 任意 | comma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb | |
scroll | 文字列 | 任意 | 'slow' or 'fast' — triggers lazy-loaded content | |
timeout | 整数 | 任意 | 30000 | |
callback | 文字列 | 任意 | ||
useProxy | 文字列 | 任意 | 'default' = datacenter proxy (2 credits/page); 'none' disables | |
proxyAuth | 文字列 | 任意 | ||
discussion | 真偽値 | 任意 | pass false to disable automatic extraction of product reviews | true |
renderDelay | 整数 | 任意 | extra rendering ms before DOM extraction, max 180000 | |
- クエリパラメータ
url文字列必須target URL to extract
例:
http://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.htmlproxy文字列任意fields文字列任意comma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb
scroll文字列任意'slow' or 'fast' — triggers lazy-loaded content
timeout整数任意例:
30000callback文字列任意useProxy文字列任意'default' = datacenter proxy (2 credits/page); 'none' disables
proxyAuth文字列任意discussion真偽値任意pass false to disable automatic extraction of product reviews
例:
truerenderDelay整数任意extra rendering ms before DOM extraction, max 180000
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
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());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は $0.001196/call です。サービス料を含みます。