API Keys, Creation and Management

To access the Similarweb APIs, you need to authenticate your requests using an API key. API access is managed by admins who can easily generate an API key for themselves or for another user on their account within the Similarweb platform.

 

Creating an API Key

To generate an API Key, follow these steps:

  1. Log in to the Similarweb platform.
  2. From the main menu to the left, select Settings & Help, then select Account.
  3. Under Data Tools, you can select either REST API or Batch API to generate a key.
  4. Click ‘Generate a New API Key’ to the right.
  5. Type the name of the API Key, then select whether this is for yourself or another user. If this is for someone else, simply enter their email address.
  6. Click Create - your key will be displayed in the Generated Keys table.

 

Activating & Managing API Keys

How to confirm that your key is activated

To ensure the new key can be used to pull data, in the Generated Keys table, click the button to the left of the email address of the user you generated the API key for. You'll see a drop-down with the specific API key(s) generated for that user, including the Title, Key, Created Date, Last Used, Monthly Usage, and Activation.

Under the Activation column, make sure the toggle is on for the relevant API key.

Key Management

Users can create and manage their own keys and Admins can create and manage API keys for the entire account.

  1. Every user can have up to 3 active keys
  2. There's no expiry date on active keys
  3. When a user is removed from the account, there’s also an option of removing their API keys. 
  4. Admins can set credit limits per user under each API. so for example a user can have 10K on REST API and 10K on Batch API. only Admins can control limits. The limits are per user and not per key.
  

          Important: Please don’t share your key publicly. Exposing your credentials can result in your account being compromised, and lead to unexpected charges.   

  

          Also important: If an API key has been created but not activated, then you will receive an "Invalid API key" error when trying to pull data with it.   

 

FAQs

Q: How do I delete or transfer an API key?

When an admin user deletes or deactivates a user on their account, if there are any active API keys associated with that user, the admin will be prompted with 2 options:

  1. Transfer the API key(s) to a different active user on the same account.
  2. Disable the API key(s) so that all users on the account will no longer be able to use it.

Q: How many API keys can a user have? 

There is no limit to how many API keys can be created for a user. However, only 3 API keys can be active at a time. This applies to the REST API and the Batch API separately - meaning, you can have 3 REST API keys active at the same time as 3 Batch API keys. 

Q: What is the difference between an API Key and Data Credits?

The API Key grants you access to the API reports. The Data Credits are like the “currency” needed for pulling the data. To understand more about Data Credits and how to allocate those, please click here.

Q: Is there a developer hub that has more information about Similarweb’s API?

As a matter of fact, there is an entire subdomain made for just that! Please click here to go and check it out. It has tons of useful information about how to set up your APIs, Integrations, a more in-depth FAQ, and more. 

 

Was this article helpful?
0 out of 0 found this helpful