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/callAl precio del proveedor
- Success rate
- 73,3 %Last 30 days · 333 calls
- Latency p50
- 237 msp95 1.2 s
- Last verified
- 28 jul 2026Verified working
GEThttps://toolswitch.dev/v1/tools/diffbot.x.web-search?size=3&text=knowledge+graph+AIPreviewTry onlinePróximamenteProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Parámetros
llm.diffbot.com requires Bearer authorization instead of Diffbot's usual query token; the approved catalog target applies that profile
| Parámetro | Tipo | Obligatorio | Descripción | Ejemplo |
|---|---|---|---|---|
| Parámetros de consulta | ||||
size | entero | Opcional | number of results to return | 10 |
text | cadena | Obligatorio | the search query | knowledge graph AI |
maxTokens | entero | Opcional | caps the search response to this token budget; highlight chunks are reduced equitably | |
- Parámetros de consulta
sizeenteroOpcionalnumber of results to return
Ejemplo:
10textcadenaObligatoriothe search query
Ejemplo:
knowledge graph AImaxTokensenteroOpcionalcaps the search response to this token budget; highlight chunks are reduced equitably
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
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());La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a $0.001196/call, incluida la tarifa de servicio.