Skip to content

Run a Web Search (GET)

GEThttps://llm.diffbot.com/api/v1/web_search

A GET flavor of Web Search. If you prefer, the POST variant is also available.

Example

bash
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>'
json
{
  "query": ["diffbot"],
  "search_results": [
    {
      "score": 0.93,
      "pageUrl": "https://www.diffbot.com/",
      "title": "Web Data for your AI",
      "content": "Imagine if your app could access the web like a structured database. ..."
    },
    {
      "score": 0.899,
      "pageUrl": "https://en.wikipedia.org/wiki/Diffbot",
      "title": "Diffbot",
      "date": "Mon, 15 Jun 2026 16:32:36 GMT",
      "content": "Diffbot is a developer of machine learning and computer vision algorithms ..."
    }
  ],
  "timeMs": 167
}

API Definition

Generated from v1.0.0 of the Web Search OpenAPI specification.

Search Diffbot’s Web Index

Request

Authentication
Authorizationheader
Cache and insert token into example requests (15d expiry)
Query parameters
textstring[] required

Your search query.

Use the following operators to refine your search.

Operator Description Example
after Documents published after the provided date after:2026-06-10
before Documents published before the provided date before:2026-05-10
site Documents matching the provided domain site:diffbot.com
url Documents matching the exact URL url:diffbot.com

(1–5 values)

sizenumber

Number of results to return in the search response (default: 10)

maxTokensnumber

Cap the search response to this value. Highlight chunks will be reduced in length equitably.

Example request

bash
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
querystring[]

The parsed query terms.

search_resultsobject[]

The ranked results.

scorenumber

Represents the confidence of the result from 0 (lowest) to highest (1). 3 decimal places of precision.

pageUrlstring

URL of the page.

titlestring

Title of the page.

contentstring

A spliced chunk highlight from the original full page contents.

datestring

Publication date of the page, when known. RFC 1123 format. Omitted when the page has no discoverable publication date.

timeMsinteger

Time taken for retrieval, reranking, and response generation.

json
{
  "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
errorsstring[]
json
{
  "errors": [
    "query param text size must be between 1 and 5"
  ]
}
401Unauthorized
codeinteger
messagestring
json
{
  "code": 401,
  "message": "Missing or invalid Authorization header. Expected: Bearer <token>"
}