Search Diffbot’s Web Index
Request
| Authentication | |
|---|---|
Authorization | Cache and insert token into example requests (15d expiry) |
| Query parameters | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
text | Your search query. Use the following operators to refine your search.
(1–5 values) | |||||||||||||||
size | Number of results to return in the search response (default: | |||||||||||||||
maxTokens | Cap the search response to this value. Highlight chunks will be reduced in length equitably. | |||||||||||||||
Example request
curl --request GET \
--url 'https://llm.diffbot.com/api/v1/web_search?text=diffbot&size=10' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <DIFFBOT_TOKEN>'
Response
| 200Successful response | |
|---|---|
query | The parsed query terms. |
search_results | The ranked results. |
score | Represents the confidence of the result from 0 (lowest) to highest (1). 3 decimal places of precision. |
pageUrl | URL of the page. |
title | Title of the page. |
content | A spliced chunk highlight from the original full page contents. |
date | Publication date of the page, when known. RFC 1123 format. Omitted when the page has no discoverable publication date. |
timeMs | Time taken for retrieval, reranking, and response generation. |
{
"query": [
"Diffbot"
],
"search_results": [
{
"score": 0.973,
"pageUrl": "https://www.diffbot.com/",
"title": "Web Data for your AI",
"content": "Imagine if your app could access the web like a structured database.\n\n Your browser does not support the video tag. \n- 50+ data fields, including categories, revenue, locations, and investments\n- Over 246M companies and non-profits in the Knowledge Graph\n- Extract and refresh orgs on demand\n\n- More than just text — entity matching, topic-level sentiment, and more\n- Over 1.6B news articles, blog posts, and press releases in the Knowledge Graph\n\n\n## The Web is Noisy, \nDiffbot Straightens it Out \n\nThe world's largest compendium of human knowledge is buried in the code of 1.2 billion public websites. Diffbot reads it all like a human, then transforms it into usable data."
},
{
"score": 0.887,
"pageUrl": "https://www.diffbot.com/data/article/",
"title": "Diffbot | News & Articles",
"content": "..."
},
{
"score": 0.847,
"pageUrl": "https://github.com/diffbot",
"title": "Diffbot",
"date": "Thu, 12 Mar 2026 00:00:00 GMT",
"content": "..."
}
],
"timeMs": 154
}
| 400Bad Request | |
|---|---|
errors |
{
"errors": [
"query param text size must be between 1 and 5"
]
}
| 401Unauthorized | |
|---|---|
code | |
message |
{
"code": 401,
"message": "Missing or invalid Authorization header. Expected: Bearer <token>"
}