> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Diffbot

> Diffbot Knowledge Graph: search organizations, people and articles with DQL, and enhance records from partial data.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/diffbot.svg?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=a3aecfcf7eb79aa92fcba220134a479c)

[Web Catalog · Company data](https://docs.webrouter.net/data-apis.md?category=company-data)

Needs&#x20;

`DIFFBOT_TOKEN`

Endpoints

4

Auth

Key in query

[Vendor docs](https://www.diffbot.com/docs/)

&#x20;·&#x20;

[Pricing](https://www.diffbot.com/pricing/)

## Setup

| Variable | | What it is |
| - | - | - |
| `DIFFBOT_TOKEN` | required | a Diffbot API token (Diffbot dashboard home > token details) |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* The token goes in the token query parameter on every call, including POSTs.
* Diffbot's other APIs (Extract, Crawl, Natural Language, Account) live on api.diffbot.com and are not in this entry.
* The docs moved from docs.diffbot.com to [www.diffbot.com/docs](http://www.diffbot.com/docs).

## Endpoints

GET

Search the Knowledge Graph with DQL

Organizations, people, articles and other entities matching a DQL query.

[Open](#diffbot-kg-search)

POST

Search the Knowledge Graph with DQL (POST)

The POST form of DQL search, for long queries.

[Open](#diffbot-kg-search-post)

GET

Enhance a person or organization from partial data

Finds the best matching Person or Organization record for partial input and returns it with a score.

[Open](#diffbot-kg-enhance)

POST

Enhance a person or organization (POST)

The POST form of Enhance.

[Open](#diffbot-kg-enhance-post)

### Search the Knowledge Graph with DQL

GET

`/dql`

`diffbot.kg.search`

Organizations, people, articles and other entities matching a DQL query.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`query` required</td><td>string</td><td>query</td><td>DQL query. Example `type:Organization locations.city.name:"San Francisco" nbEmployees>5000`</td></tr>
    <tr><td>`type`</td><td>string</td><td>query</td><td>Query type (default query); crawl searches your custom crawl collections. One of `query`, `crawl`</td></tr>

    <tr>
      <td>
        `col`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-delimited custom crawl collections, or all; only with type=crawl.
      </td>
    </tr>

    <tr>
      <td>
        `from`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Offset; from+size must be at most 10,000 for facet queries. Deprecated for Article queries.
      </td>
    </tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Maximum results (default 50, -1 for all).
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>query</td><td>Output format (default json). One of `json`, `jsonl`, `csv`, `xls`, `xlsx`</td></tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Semicolon-separated paths to keep in the response, e.g. \$.name;\$.homepageUri.
      </td>
    </tr>

    <tr>
      <td>
        `filterExclude`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Semicolon-separated paths to drop from the response.
      </td>
    </tr>

    <tr><td>`jsonmode`</td><td>string</td><td>query</td><td>extended returns origin information for facts; id returns only diffbotIds and origins. One of `extended`, `id`</td></tr>

    <tr>
      <td>
        `nonCanonicalFacts`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Also return non-canonical facts.
      </td>
    </tr>

    <tr>
      <td>
        `noDedupArticles`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Return all articles without deduplication.
      </td>
    </tr>

    <tr><td>`cluster`</td><td>string</td><td>query</td><td>Articles only: all, best or dedupe. One of `all`, `best`, `dedupe`</td></tr>

    <tr>
      <td>
        `report`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Generate a coverage report.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.diffbot.com/docs/dql/get) · Same job: [Adzuna](https://docs.webrouter.net/data-apis/adzuna.md#adzuna-companies-top), [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-company-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-companies-search), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-symbol-search), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-organizations-search)

```python Python theme={null}
router.call_data_api("diffbot.kg.search", {'query': 'type:Organization locations.city.name:"San Francisco" nbEmployees>5000'})
```

```text MCP theme={null}
call_data_api(endpoint="diffbot.kg.search", params={"query": "type:Organization locations.city.name:\"San Francisco\" nbEmployees>5000"})
```

> [!NOTE]
>
> * Queries use Diffbot Query Language, e.g. type:Organization nbEmployees>5000. Check the DQL reference for current field names.

### Search the Knowledge Graph with DQL (POST)

POST

`/dql`

`diffbot.kg.search_post`

The POST form of DQL search, for long queries.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`query` required</td><td>string</td><td>body</td><td>DQL query. Example `type:Organization locations.city.name:"San Francisco" nbEmployees>5000`</td></tr>
    <tr><td>`type`</td><td>string</td><td>body</td><td>Query type (default query); crawl searches your custom crawl collections. One of `query`, `crawl`</td></tr>

    <tr>
      <td>
        `col`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Comma-delimited custom crawl collections, or all; only with type=crawl.
      </td>
    </tr>

    <tr>
      <td>
        `from`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Offset; from+size must be at most 10,000 for facet queries. Deprecated for Article queries.
      </td>
    </tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Maximum results (default 50, -1 for all).
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>body</td><td>Output format (default json). One of `json`, `jsonl`, `csv`, `xls`, `xlsx`</td></tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Semicolon-separated paths to keep in the response, e.g. \$.name;\$.homepageUri.
      </td>
    </tr>

    <tr>
      <td>
        `filterExclude`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Semicolon-separated paths to drop from the response.
      </td>
    </tr>

    <tr><td>`jsonmode`</td><td>string</td><td>body</td><td>extended returns origin information for facts; id returns only diffbotIds and origins. One of `extended`, `id`</td></tr>

    <tr>
      <td>
        `nonCanonicalFacts`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Also return non-canonical facts.
      </td>
    </tr>

    <tr>
      <td>
        `noDedupArticles`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return all articles without deduplication.
      </td>
    </tr>

    <tr><td>`cluster`</td><td>string</td><td>body</td><td>Articles only: all, best or dedupe. One of `all`, `best`, `dedupe`</td></tr>

    <tr>
      <td>
        `report`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Generate a coverage report.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.diffbot.com/docs/dql/post) · Same job: [Adzuna](https://docs.webrouter.net/data-apis/adzuna.md#adzuna-companies-top), [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-company-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-companies-search), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-symbol-search), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-organizations-search)

```python Python theme={null}
router.call_data_api("diffbot.kg.search_post", {'query': 'type:Organization locations.city.name:"San Francisco" nbEmployees>5000'})
```

```text MCP theme={null}
call_data_api(endpoint="diffbot.kg.search_post", params={"query": "type:Organization locations.city.name:\"San Francisco\" nbEmployees>5000"})
```

> [!NOTE]
>
> * A read over POST: it only queries.

### Enhance a person or organization from partial data

GET

`/enhance`

`diffbot.kg.enhance`

Finds the best matching Person or Organization record for partial input and returns it with a score.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`type` required</td><td>string</td><td>query</td><td>Entity type. One of `Person`, `Organization`</td></tr>

    <tr>
      <td>
        `id`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        DiffbotId of the entity.
      </td>
    </tr>

    <tr>
      <td>
        `name`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Entity name(s).
      </td>
    </tr>

    <tr>
      <td>
        `url`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Homepage or origin URL(s).
      </td>
    </tr>

    <tr>
      <td>
        `phone`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Phone.
      </td>
    </tr>

    <tr>
      <td>
        `email`
      </td>

      <td>
        array
      </td>

      <td>
        query
      </td>

      <td>
        Email(s); Person only.
      </td>
    </tr>

    <tr>
      <td>
        `employer`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Employer; Person only.
      </td>
    </tr>

    <tr>
      <td>
        `title`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Job title; Person only.
      </td>
    </tr>

    <tr>
      <td>
        `school`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        School; Person only.
      </td>
    </tr>

    <tr>
      <td>
        `location`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Location.
      </td>
    </tr>

    <tr>
      <td>
        `description`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Description.
      </td>
    </tr>

    <tr>
      <td>
        `ip`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        IP address.
      </td>
    </tr>

    <tr>
      <td>
        `customId`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Your own ID for correlation.
      </td>
    </tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Maximum results (default 1).
      </td>
    </tr>

    <tr>
      <td>
        `threshold`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Similarity threshold.
      </td>
    </tr>

    <tr>
      <td>
        `refresh`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Recrawl the entity origins and rebuild the entity.
      </td>
    </tr>

    <tr>
      <td>
        `search`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Also search the web for origins and merge them in.
      </td>
    </tr>

    <tr>
      <td>
        `nonCanonicalFacts`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Also return non-canonical facts.
      </td>
    </tr>

    <tr><td>`jsonmode`</td><td>string</td><td>query</td><td>extended returns origin information for facts. One of `extended`</td></tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Semicolon-separated paths to keep.
      </td>
    </tr>

    <tr>
      <td>
        `filterExclude`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Semicolon-separated paths to drop.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.diffbot.com/docs/enhance/get) · Same job: [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-company-get), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-enrich), [Albacross](https://docs.webrouter.net/data-apis/albacross.md#albacross-enrich-company), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-linkedin-company), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-organizations-enrich), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-company-enrich)

> [!NOTE]
>
> * Works for both company and person lookups: set type to Organization or Person.

### Enhance a person or organization (POST)

POST

`/enhance`

`diffbot.kg.enhance_post`

The POST form of Enhance.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`type` required</td><td>string</td><td>body</td><td>Entity type. One of `Person`, `Organization`</td></tr>

    <tr>
      <td>
        `id`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        DiffbotId of the entity.
      </td>
    </tr>

    <tr>
      <td>
        `name`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Entity name(s).
      </td>
    </tr>

    <tr>
      <td>
        `url`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Homepage or origin URL(s).
      </td>
    </tr>

    <tr>
      <td>
        `phone`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Phone.
      </td>
    </tr>

    <tr>
      <td>
        `email`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Email(s); Person only.
      </td>
    </tr>

    <tr>
      <td>
        `employer`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Employer; Person only.
      </td>
    </tr>

    <tr>
      <td>
        `title`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Job title; Person only.
      </td>
    </tr>

    <tr>
      <td>
        `school`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        School; Person only.
      </td>
    </tr>

    <tr>
      <td>
        `location`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Location.
      </td>
    </tr>

    <tr>
      <td>
        `description`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Description.
      </td>
    </tr>

    <tr>
      <td>
        `ip`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        IP address.
      </td>
    </tr>

    <tr>
      <td>
        `customId`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Your own ID for correlation.
      </td>
    </tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Maximum results (default 1).
      </td>
    </tr>

    <tr>
      <td>
        `threshold`
      </td>

      <td>
        number
      </td>

      <td>
        body
      </td>

      <td>
        Similarity threshold.
      </td>
    </tr>

    <tr>
      <td>
        `refresh`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Recrawl the entity origins and rebuild the entity.
      </td>
    </tr>

    <tr>
      <td>
        `search`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Also search the web for origins and merge them in.
      </td>
    </tr>

    <tr>
      <td>
        `nonCanonicalFacts`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Also return non-canonical facts.
      </td>
    </tr>

    <tr><td>`jsonmode`</td><td>string</td><td>body</td><td>extended returns origin information for facts. One of `extended`</td></tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Semicolon-separated paths to keep.
      </td>
    </tr>

    <tr>
      <td>
        `filterExclude`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Semicolon-separated paths to drop.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.diffbot.com/docs/enhance/post) · Same job: [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-company-get), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-enrich), [Albacross](https://docs.webrouter.net/data-apis/albacross.md#albacross-enrich-company), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-linkedin-company), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-organizations-enrich), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-company-enrich)

> [!NOTE]
>
> * A read over POST: it only looks up data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.