Skip to content

Account API

GEThttps://api.diffbot.com/v4/account

Returns account plan, usage, child tokens, and other account details.

API Definition

Generated from v1.1 of the Account API OpenAPI specification.

Returns account plan, usage, child tokens, and other account details.

Request

Authentication
tokenquery
Cache and insert token into example requests (15d expiry)
Query parameters
daysinteger (int32)

Pass the number of days (&days=365) for which you would like to retrieve API call volumes (default = 31).

Example request

bash
curl --request GET \
  --url 'https://api.diffbot.com/v4/account?token=<DIFFBOT_TOKEN>' \
  --header 'Accept: application/json'

Response

200Successful API Response
namestring

Name associated with the token.

emailstring

Email address associated with the token.

planstring

Current plan for the token.

planCreditsinteger

Amount of monthly calls included.

statusstring

Status of the token.

createdstring (date)
tokenstring
childTokensstring[]

List of child or sub-tokens, if there are any associated with your account.

usageobject[]

An array of days and call volume amounts for each day. By default this will return data from the most recent 31 days. Use the days argument to adjust the response window. Dates prior to token becoming active will not be returned.

datestring (date)

Date, e.g. 2019-12-01.

nlpinteger

Total number of Natural Language API calls made.

creditsinteger

Total number of credits consumed.

extractionsinteger

Total number of Extraction API calls made.

proxiesinteger

Total number of calls made using proxy servers. Read more.

entitiesinteger

Total number of entities downloaded from the Diffbot Knowledge Graph.

refreshinteger

Total number of entity refreshes requested.

facetsinteger

Total number of facet values returned.

videosinteger

Total number of videos downloaded.

subtitlesinteger

Total number of subtitles requested.

json
{
  "created": "2020-04-22",
  "usage": [
    {
      "date": "2022-05-04",
      "subtitles": 0,
      "nlp": 0,
      "entities": 10,
      "credits": 258,
      "refresh": 0,
      "proxies": 0,
      "videos": 0,
      "extractions": 8,
      "facets": 0
    },
    {
      "date": "2022-05-03",
      "subtitles": 0,
      "nlp": 0,
      "entities": 75,
      "credits": 1875,
      "refresh": 0,
      "proxies": 0,
      "videos": 0,
      "extractions": 0,
      "facets": 0
    }
  ],
  "name": "Diffy",
  "childTokens": [
    "xxxx",
    "xxxx"
  ],
  "plan": "diffy-plans-to-hangout-all-day",
  "email": "sales@diffbot.com",
  "token": "xxxx",
  "status": "active"
}
401Unauthorized
errorCodeinteger
errorstring
json
{
  "errorCode": 401,
  "error": "Not authorized API token."
}