curl

Introduction

Welcome to the Dataframes API! You can use our API to access data about registered companies in Denmark, Serbia and Slovakia.

You can view code shell examples in the dark area to the right.

Authentication

To access Dataframes you need an API Key. You can get one after registration at portal.

We expect you to include API key in all API requests to the server as query parameter:

?access_token=API_KEY

Companies

All Companies per country

curl "https://api.dataframes.io/v1/dk/companies?access_token=API_KEY"

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "name": "Fluffums",
    "breed": "calico",
    "fluffiness": 6,
    "cuteness": 7
  },
  {
    "id": 2,
    "name": "Isis",
    "breed": "unknown",
    "fluffiness": 5,
    "cuteness": 10
  }
]

Using this endpoint, you can retrieve all companies by provided country. All you need to do is provide company short code id. Currently, following countries are available:

We are in the process of adding companies from Norway, Czech Republic and Cyprus soon. Please send email to support if you need those datasets so that we can prioritize those countries higher.

HTTP Request

GET https://api.dataframes.io/v1/:country-id/companies

URL Parameters

Parameter Description
country-id Country short id for which companies would be retrieved

Specific Company by Id

curl "http://api.dataframes.io/v1/rs/companies/20622849?access_token=SUPER_TOKEN"

The above command returns JSON structured like this:

{
  "id": 2,
  "name": "Isis",
  "breed": "unknown",
  "fluffiness": 5,
  "cuteness": 10
}

This endpoint retrieves a specific company using country short code and company unique identifier (which is usually company’s official registration id).

HTTP Request

GET https://api.dataframes.io/v1/:country-id/companies/:company-id

URL Parameters

Parameter Description
country-id Country short id for which companies would be retrieved
company-id Company unique identifier

Pagination

The Dataframes API uses pagination for the collection resources. E.x. if you want to find all companies by the country you can fetch them only 100 items at a time.

You can see a total number of corresponding to requested API resource using X-Total-Count HTTP Response header.

If you want to retrieve particular page you can specify page query parameter. Also, you can specify a custom limit for the number of items per page using per_page query parameter. The default value is 100.

Also for better navigation through paged results you can use Link HTTP Response header. This header usually has a link to the first, next, previous and the last page in all results.

Rate Limiting

We allow up to 2000 requests per hour using one API key.

Each HTTP response has following headers that allow you to know your current rate limit status:

Header Description
X-RateLimit-Limit Total requests limit per hour
X-RateLimit-Remaining Remaining requests limit in the current rate limit window
X-RateLimit-Reset The time at which the current rate limit window resets in

Errors

The Dataframes API uses the following error codes:

Error Code Meaning
400 Bad Request – Probably you send request in the wrong format
401 Unauthorized – Your API key is wrong
403 Forbidden – Probably you are out of rate-limit
404 Not Found – The specified resources could not be found
405 Method Not Allowed – We only support HTTP GET
406 Not Acceptable – You requested a format that isn’t json