Here’s to open and free data

We built a platform packed with business related data. We go to great lengths to accurately match each and every company on our platform with their legal entity and online footprint. That’s how we make sure our data is fully transparent. As if that wasn’t enough; our API is openly available for anyone and it’s free too. Exactly how we think it should be.

This is what we did

We spent three years working around the clock gathering and mapping companies’ data and uncovering their online impressions. Once all the data was collected, we worked a little more, and structured the valuable data into our API, which doesn’t even cost a dime.

How to get access

All you have to do is email access@ocean.io with your business and a short description of your purpose. Then we’ll provide you with user credentials as fast as we can – and within no more than a few hours.

We look forward to teaming up.

logo_white
1.17API

Authentication

The Ocean.io API requires authentication - specifically, if its requests made on behalf of a user. Authenticated requests require an access_token. These tokens are unique to a user and should be stored securely. Access tokens may expire at any time in the future.

RECEIVING AN ACCESS_TOKEN

In order to receive an access_token, you must login.

POST /api/{version}/user/login

Parameters

  • NameTypeDescription
  • VersionStringAPI version
  • LoginStringlogin for Ocean.io API account
  • PasswordStringpassword for Ocean.io API account

Example

Raw

POST /api/v1/user/login HTTP/1.1
Host: api.ocean.io
Content-Type: application/json
Body:
{
    “login”: “user_login”,
    “password”: “user_password”
}
PHP

<?php
  $ch = curl_init('https://api.ocean.io/api/v1/user/login');

  $post = [
      'login' => 'user_login',
      'password' => 'user_password',
  ];
  $payload = json_encode($post);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Content-Type: application/json',
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);

  $response = curl_exec($ch);
  $json_data = json_decode($response);

  curl_close($ch);
?>
cURL

curl -XPOST 'https://api.ocean.io/api/v1/user/login' -H 'Content-Type: application/json' -d'
{
    "login" : "user_login",
    "password": "user_password"
}
'

Response


{
“token”:
“HAHSdkjaHSkdjashdkajsjdhklaSDKJASIODioASKDLKNAdnmaBSDnAMSBDmAMSDASDUoasjdnnbasdklmadANM”
}

Get company

GET /api/{version}/company/{counry_code}/{state_abbreviation}/{company_id}

Parameters

  • NameTypeDescription
  • versionstringAPI version
  • country_codestringcountry code in ISO 3166-1 alpha-2 format. Specifies country where to search company
  • state_abbreviationstringcompany state abbreviation
  • company_idstringcompany registration number

Rate limit

One user can perform 1000 requests per one calendar hour. For example, if you reach the limit at 09:58, you can perform requests in 2 minutes, because new calendar hour starts.


{
    "status": 429,
    "error": "Too Many Requests"
}

Example

Raw

GET /api/v1/company/dk/-/36436506 HTTP/1.1
Authorization: Token sakdAHSJKponyKHDashdkaKLSDhakdAHKLSdjlAHSdklAJSdklhAKLSDJLASHDKLAD
Host: api.ocean.io
PHP

<?php
  $ch = curl_init('https://api.ocean.io/api/v1/company/dk/-/36436506');

  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Token HAHSdkjaHSkdjashdkajsjdhklaSDKJASIODioASKDLKNAdnmaBSDnAMSBDmAMSDASDUoasjdnnbasdklmadANM'
  ]);

  $response = curl_exec($ch);
  $json_data = json_decode($response);

  curl_close($ch);
?>
cURL

curl -XGET -H 'Authorization: Token sakdAHSJKponyKHDashdkaKLSDhakdAHKLSdjlAHSdklAJSdklhAKLSDJLASHDKLAD' 'https://api.ocean.io/api/v1/company/dk/-/36436506'

Response example


{
  "name": "SORDAHL ApS",
  "logo": "https://ocean.io/media/img/9751b554a5d911e69e2406d84dd91e2b.png?img_filter=logo",
  "description": "Design and brand studio located in Copenhagen.

Our Services:

• Drupal Websites
We have been working with Drupal for more than 5 years, making it our preferred system for online solutions.

• Responsive Designs
Taking advantage of new technologies when developing and designing solutions, making each site extraordinary on all devices.

• Mobile Applications
Creating applications & games for mobile devices optimized for both iPhone, iPad and Android devices.

For more information, visit http://sordahl.net",
  "registration_date": "2014-11-18T00:00:00+0000",
  "url": "http://sordahl.net/",
  "status": "Operating",
  "type": "Privately Held",
  "address": [
    {
      "country_code": "dk",
      "raw_address": "Denmark, , København Ø, Sortedam Dossering 53A",
      "postal_code": "2100",
      "locality": "København Ø",
      "address_line1": "Sortedam Dossering 53A"
    }
  ],
  "media": [
    {
      "url": "http://www.linkedin.com/company/sordahl-design-studio",
      "type": "linkedin"
    },
    {
      "url": "https://twitter.com/sordahl",
      "type": "twitter"
    },
    {
      "url": "https://www.facebook.com/sordahl.dk",
      "type": "facebook"
    }
  ],
  "country_code": "dk",
  "state_abbreviation": "-",
  "registration_number": "36436506"
}

Search company

GET /api/{version}/company/search?country_code={country_code}&q={search_word}&limit={limit}&offset={offset}

Parameters

  • NameTypeDescription
  • versionstringAPI version
  • country_codestringcountry code in ISO 3166-1 alpha-2 format. Specifies country where to search company. By default: all countries.
  • qstringWord for search, e.g. company name
  • limitintegerinteger Results limit. By default: 10, limited by 100
  • offsetintegerResults offset. By default: 0, limited by 10000

Rate limit

One user can perform 100 requests per one calendar hour. For example, if you reach the limit at 09:58, you can perform requests in 2 minutes, because new calendar hour starts.


{
    "status": 429,
    "error": "Too Many Requests"
}

Example

Raw

GET /api/v1/company/search?country_code=dk&q=sordahl HTTP/1.1
Authorization: Token HAHSdkjaHSkdjashdkajsjdhklaSDKJASIODioASKDLKNAdnmaBSDnAMSBDmAMSDASDUoasjdnnbasdklmadANM
Host: api.ocean.io
PHP

<?php
  $ch = curl_init('https://api.ocean.io/api/v1/company/search?country_code=dk&q=sordahl');

  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Token HAHSdkjaHSkdjashdkajsjdhklaSDKJASIODioASKDLKNAdnmaBSDnAMSBDmAMSDASDUoasjdnnbasdklmadANM'
  ]);

  $response = curl_exec($ch);
  $json_data = json_decode($response);

  curl_close($ch);
?>
cURL

curl -XGET -H 'Authorization: Token HAHSdkjaHSkdjashdkajsjdhklaSDKJASIODioASKDLKNAdnmaBSDnAMSBDmAMSDASDUoasjdnnbasdklmadANM' 'https://api.ocean.io/api/v1/company/search?country_code=dk&q=sordahl'

Responce example


{
  "limit": 10,
  "offset": 0,
  "total": 1,
  "results": [
    {
      "name": "SORDAHL ApS",
      "logo": "https://ocean.io/media/img/9751b554a5d911e69e2406d84dd91e2b.png?img_filter=logo",
      "description": "Design and brand studio located in Copenhagen.

Our Services:

• Drupal Websites
We have been working with Drupal for more than 5 years, making it our preferred system for online solutions.

• Responsive Designs
Taking advantage of new technologies when developing and designing solutions, making each site extraordinary on all devices.

• Mobile Applications
Creating applications & games for mobile devices optimized for both iPhone, iPad and Android devices.

For more information, visit http://sordahl.net",
      "registration_date": "2014-11-18T00:00:00+0000",
      "url": "http://sordahl.net/",
      "status": "Operating",
      "type": "Privately Held",
      "address": [
        {
          "country_code": "dk",
          "raw_address": "Denmark, , København Ø, Sortedam Dossering 53A",
          "postal_code": "2100",
          "locality": "København Ø",
          "address_line1": "Sortedam Dossering 53A"
        }
      ],
      "media": [
        {
          "url": "http://www.linkedin.com/company/sordahl-design-studio",
          "type": "linkedin"
        },
        {
          "url": "https://twitter.com/sordahl",
          "type": "twitter"
        },
        {
          "url": "https://www.facebook.com/sordahl.dk",
          "type": "facebook"
        }
      ],
      "country_code": "dk",
      "state_abbreviation": "-",
      "registration_number": "36436506"
    }
  ]
}

Country statistic

GET /api/{version}/company/stats

Parameters

  • NameTypeDescription
  • versionstringAPI version

Rate limit

There is no rate limit.

Example

Raw

GET /api/v1/company/stats HTTP/1.1
Host: api.ocean.io
PHP

<?php
  $ch = curl_init('https://api.ocean.io/api/v1/company/stats');

  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $response = curl_exec($ch);
  $json_data = json_decode($response);

  curl_close($ch);
?>
cURL

curl -XGET 'https://api.ocean.io/api/v1/company/stats'

Response example


{
  "be": 783409,
  "us": 28768886,
  "fr": 44979,
  "ca": 26690,
  "fi": 491066,
  "ru": 5615405,
  "gb": 4465447,
  "mx": 720632,
  "hk": 1170,
  "py": 108298,
  "ro": 5225114,
  "ne": 8650,
  "je": 166216,
  "kr": 1948,
  "cn": 3308,
  "se": 1663041,
  "kz": 574197,
  "no": 1120638,
  "de": 794659,
  "tw": 670818,
  "au": 14606771,
  "id": 24426,
  "co": 36853,
  "do": 2742416,
  "bj": 7740,
  "md": 190583,
  "dk": 737454,
  "th": 1168880,
  "uy": 2412,
  "jp": 3046,
  "lv": 628341,
  "by": 923103,
  "in": 1464035,
  "il": 363196
}