Web search shaped for an LLM context window
diffbot.x.web-searchSearch the web and return results shaped for feeding into an LLM context window
- Price
- $0.001196/callAu prix du fournisseur
- Success rate
- 73,3 %Last 30 days · 333 calls
- Latency p50
- 237 msp95 1.2 s
- Last verified
- 28 juil. 2026Verified working
GEThttps://toolswitch.dev/v1/tools/diffbot.x.web-search?size=3&text=knowledge+graph+AIPreviewTry onlineBientôtProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
llm.diffbot.com requires Bearer authorization instead of Diffbot's usual query token; the approved catalog target applies that profile
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Paramètres de requête | ||||
size | entier | Facultatif | number of results to return | 10 |
text | chaîne | Obligatoire | the search query | knowledge graph AI |
maxTokens | entier | Facultatif | caps the search response to this token budget; highlight chunks are reduced equitably | |
- Paramètres de requête
sizeentierFacultatifnumber of results to return
Exemple :
10textchaîneObligatoirethe search query
Exemple :
knowledge graph AImaxTokensentierFacultatifcaps the search response to this token budget; highlight chunks are reduced equitably
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/diffbot.x.web-search?size=3&text=knowledge+graph+AI' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/diffbot.x.web-search?size=3&text=knowledge+graph+AI",
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.web-search?size=3&text=knowledge+graph+AI", {
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());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à $0.001196/call, frais de service inclus.