Auto-detect a page type and extract it by URL
diffbot.x.extract-analyzeAutomatically identifies the type of page being processed and routes it through the relevant Diffbot API
- Price
- $0.001196/callプロバイダー原価
- Success rate
- 99.9%Last 30 days · 7,365 calls
- Latency p50
- 2.6 sp95 24 s
- Last verified
- 2026/07/28Verified working
GEThttps://toolswitch.dev/v1/tools/diffbot.x.extract-analyze?url=https%3A%2F%2Fwww.diffbot.com%2Fproducts%2Fextract%2FPreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
different HOST than base_url — api.diffbot.com, not kg.diffbot.com
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
url | 文字列 | 必須 | target URL to extract, URL-encoded | https://www.technologyreview.com/2020/09/04/1008156/knowledge-graph-ai-reads-web-machine-learning-natural-language-processing/ |
mode | 文字列 | 任意 | restrict extraction to one page type: article, product, discussion, image, video, list, event | |
proxy | 文字列 | 任意 | custom proxy IP for fetching the target page | |
fields | 文字列 | 任意 | comma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb | |
scroll | 文字列 | 任意 | 'slow' or 'fast' — triggers lazy-loaded content | |
timeout | 整数 | 任意 | ms to wait for content retrieval | 30000 |
callback | 文字列 | 任意 | JSONP callback for cross-domain AJAX | |
fallback | 文字列 | 任意 | which API to fall back to if page type cannot be determined | |
useProxy | 文字列 | 任意 | 'default' routes through Diffbot's datacenter proxy (2 credits/page instead of 1); 'none' disables proxies | |
proxyAuth | 文字列 | 任意 | username:password for the custom proxy | |
discussion | 真偽値 | 任意 | pass false to disable automatic comment/review extraction | true |
renderDelay | 整数 | 任意 | extra rendering ms before DOM extraction, max 180000 | |
- クエリパラメータ
url文字列必須target URL to extract, URL-encoded
例:
https://www.technologyreview.com/2020/09/04/1008156/knowledge-graph-ai-reads-web-machine-learning-natural-language-processing/mode文字列任意restrict extraction to one page type: article, product, discussion, image, video, list, event
proxy文字列任意custom proxy IP for fetching the target page
fields文字列任意comma-delimited optional fields: links, extlinks, meta, querystring, breadcrumb
scroll文字列任意'slow' or 'fast' — triggers lazy-loaded content
timeout整数任意ms to wait for content retrieval
例:
30000callback文字列任意JSONP callback for cross-domain AJAX
fallback文字列任意which API to fall back to if page type cannot be determined
useProxy文字列任意'default' routes through Diffbot's datacenter proxy (2 credits/page instead of 1); 'none' disables proxies
proxyAuth文字列任意username:password for the custom proxy
discussion真偽値任意pass false to disable automatic comment/review extraction
例:
truerenderDelay整数任意extra rendering ms before DOM extraction, max 180000
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
curl -X GET 'https://toolswitch.dev/v1/tools/diffbot.x.extract-analyze?url=https%3A%2F%2Fwww.diffbot.com%2Fproducts%2Fextract%2F' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/diffbot.x.extract-analyze?url=https%3A%2F%2Fwww.diffbot.com%2Fproducts%2Fextract%2F",
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-analyze?url=https%3A%2F%2Fwww.diffbot.com%2Fproducts%2Fextract%2F", {
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 です。サービス料を含みます。