Skip to content

Authentication

All Diffbot API requests (GET and POST) are authenticated via the token parameter with a token created upon registration of a new Diffbot account or generated under parent tokens.

Getting a Diffbot API token

You may register for a free token here.

Once registered, to access your token, go to the Diffbot Dashboard home screen and click the link in the top right hand corner.

Your token details page will reveal your full token along with usage activity and invoice history.

How to authenticate Diffbot API requests

Supply your Diffbot API token to the token parameter of any request. See examples below for GET and POST requests.

GET Example

curl
curl --request GET \
     --url 'https://api.diffbot.com/v3/analyze?token=<DIFFBOT_TOKEN>&url=https%3A%2F%2Fwww.diffbot.com%2Fdocs%2Fintroduction' \
     --header 'accept: application/json'

POST Example

curl
curl --request POST \
     --url 'https://kg.diffbot.com/kg/v3/enhance?token=<DIFFBOT_TOKEN>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "name": "Diffbot",
  "type": "Organization"
}
'

Retrieving token details and usage

The Account API has everything you need.