At DataHawk, we have developed our own RESTful API, allowing you to manage your DataHawk account and access all the great metrics we provide without going through our web application.

DataHawk users that rely on our API typically use it to pull the metrics we provide in JSON format and display them in their own internal systems, such as as data visualization tools (Google Data Studio, Tableau, QlikView, Looker etc.) or spreadsheets, adding them to other in-house data they have, hence extracting a lot of additional value and insights.

How much does the DataHawk API cost?

Keep in mind that using the API comes at an additional cost of $100/mo

To start testing the API free of charge, please send us a message so that we activate your API Key. After we notice a continued usage from your end, our support team will get in touch with you to confirm that you want to subscribe to the API and to update your subscription with the additional $100/mo charge.

At this time, there is no rate limit in terms of the API calls you can make.

What can I do with the DataHawk API?

Here is a list of the current capabilities of our API:

  • Create, Edit, or Delete a Project
  • Add or Remove a Keyword or ASIN to track in a Project
  • Export the Metrics history of an ASIN (Price, number of Reviews, Rating, BSR...)
  • Export the Keywords ranking history of an ASIN based on the keywords you're tracking in the same project

We naturally welcome your feedback as to what additional capabilities you'd like to see in our API.

Getting Set-up with our API

Step 1: Request the Activation of your API Key to our Support Team

  1. Log in to your DataHawk account, navigate to your Account section from the left navigation menu, then scroll down to the bottom of the page and click on "Activate my API Key" right under your API Key.
  2. Our team will enable API access for your account in under 12 hours so that you start testing the API free of charge. Keep in mind the API is a paid add-on if you want to continue using it.

Step 2: Authorize your API Key in the Swagger Documentation

  1. Log in to your DataHawk account, navigate to your Account section from the left navigation menu, then scroll down to the bottom of the page. Under the API Key section, you will find your secret API Key which you can then copy.
  2. On our API Swagger Documentation, click on Authorize, enter your API key, and hit the Authorize confirmation button. You're now essentially logged in to use our API. If the authentication fails, it means you didn't request API access first from us as described on Step 1.

Copying your API Key

Authenticating with your API Key

Step 3: Start Using our API

  1. Now that your API Key is activated and that you're authenticated, you can start making API calls. The {wid} parameter needs to be replaced by me in the API calls - me referencing essentially to your own workspace.
  2. Read the DataHawk API Documentation by clicking on the button below to access the API Swagger documentation.

Examples of API Calls

You can rely on our Swagger Documentation interface to understand our API calls and try them out provided you're authenticated.

Example: Creating a Project in your Account

In this example, we want to mimic using the POST /v1/{wid}/projects API call which creates a Project - as a reminder, the {wid} parameter is to be replace by me. On the Swagger documentation, and as you click on the above API call details, you can see the necessary parameters which you can edit:

{
  "name": "string",
  "marketplaceId": 0,
  "description": "string"
}

name: the name of your Project
marketplaceId: the ID of the marketplace - more on this below
description: the description of your Project

Step 1: Finding the marketplaceId Parameter

To find the marketplaceId for the US Amazon marketplace for instance, we'll need to use another API Call we can find in the Swagger Documentation, the GET /v1/marketplaces/amazon/v1/marketplaces/amazon

Once you navigate to it, click on Try it Out then on Execute.

This should display the Response Request URL which you could use on your navigator if you want to make the corresponding GET method API Call, it should look like this - with your API key in lieu of the myapikey text:

https://api.datahawk.co/v1/marketplaces/amazon?key=myapikey

As to the cURL command, it should look like this:

curl -X GET "https://api.datahawk.co/v1/marketplaces/amazon?key=myapikey" -H "accept: text/plain"

On the response body, you can see that the marketplaceId for the US is 1. For France, it's 3.

[
  {
    "marketplaceId": 1,
    "marketplaceAmazonId": null,
    "name": "Amazon - United States",
    "url": "https://www.amazon.com",
    "countryCode": "US"
  },
  {
    "marketplaceId": 2,
    "marketplaceAmazonId": null,
    "name": "Amazon - Canada",
    "url": "https://www.amazon.ca",
    "countryCode": "CA"
  },
  {
    "marketplaceId": 3,
    "marketplaceAmazonId": null,
    "name": "Amazon - France",
    "url": "https://www.amazon.fr",
    "countryCode": "FR"
  }
]

Step 2: Creating a Project

Back to the POST /v1/{wid}/projects API call in the Swagger Documentation, click on Try it Out and replace the existing text with the following

{
  "name": "My Test Project",
  "marketplaceId": 1,
  "description": "This is a Test Project Using DataHawk API"
}

After entering me in the wid parameter field, click on Execute.

This should create the project in your account and display the cURL command which should look like this:

curl -X POST "https://api.datahawk.co/v1/me/projects?key=myapikey" -H "accept: text/plain" -H "Content-Type: application/json-patch+json" -d "{ \"name\": \"My Test Project\", \"marketplaceId\": 1, \"description\": \"This is a Test Project Using DataHawk API\"}"

Did this answer your question?