Authentication
How to authenticate with the InternetData HTTP API.
There are two generations of this API, and they take different keys.
v2 (current)
Use a key issued from the console, carrying the db.download scope. Present it any of three ways, whichever suits your client:
curl -H "Authorization: Bearer $KEY" https://internetdata.io/api/v2/database/list
curl -H "X-Api-Key: $KEY" https://internetdata.io/api/v2/database/list
curl "https://internetdata.io/api/v2/database/list?apikey=$KEY"They are the same key. The query parameter exists for curl and the browser, which is how a database is usually fetched; prefer a header where setting one is easy.
A missing or invalid key answers 401:
{
"rc": "UNAUTHORIZED"
}A key that is valid but does not license the dataset you asked for answers 403 with NOT_LICENSED, and one whose term has ended answers 403 with LICENSE_EXPIRED. The difference matters: the first means buy it, the second means renew it.
v1 (legacy)
Existing integrations authenticate with the apikey query parameter and a UUID key, in either format:
- with dashes -
b8e25dda-5f6a-471e-87eb-d8ab866ea90e - without -
b8e25dda5f6a471e87ebd8ab866ea90e
A missing or invalid key answers 401:
{
"rc": "INVALID_APIKEY"
}v1 keys are not accepted on v2 and v2 keys are not accepted on v1: they are separate vocabularies. New integrations should use v2, which adds the catalogue listing, download history, and time-limited download links served straight from object storage.