Usage Limits
Rate Limiting
We define rate limits on a per-key basis and use a fixed-window rate limiting strategy. So if your API key's rate limit is 100
requests per minute, you can make those 100
API calls at any interval within the 60-second window.
Rate limits for all of our API endpoints are separate. To view your rate limits, you can access our API dashboard or use the headers in your API response (as shown below.)
import requests
# Set the headers
HEADERS = {
'x-api-key': "YOUR API KEY"
}
# Pass the headers to the Person Enrichment API
response = requests.head('https://api.peopledatalabs.com/v5/person/enrich', headers=HEADERS)
# Print the API response headers
print(response.headers)
curl -i -X GET \
'https://api.peopledatalabs.com/v5/person/enrich' \
-H 'X-Api-Key: xxxx'
Sample Response Headers
{
"x-call-credits-spent": 1,
"x-call-credits-type": "enrich",
"x-ratelimit-reset": "2022-02-23T20:19:55Z",
"x-ratelimit-remaining": {
"minute": 1200,
"day": None,
"month": None
},
"x-ratelimit-limit": {
"minute": 1201,
"day": None,
"month": None
},
"x-lifetime-used": 984152,
"x-totallimit-remaining": 1342,
"x-totallimit-purchased-remaining": 342,
"x-totallimit-overages-remaining": 1000,
}
Header Field Descriptions
HEADER FIELD | DESCRIPTION | EXAMPLE |
---|---|---|
x-call-credits-spent | The number of credits that we billed for this API call. | 1 |
x-call-credits-type | The type of credits that you used for this API call, which can be one of following: enrich , search , search_company , enrich_company , enrich_skill , enrich_job_title , preview_search or person_identify . | enrich |
x-ratelimit-reset | The UTC timestamp that indicates when the rate limit will reset. | "2022-02-23T20:19:55Z" |
x-ratelimit-remaining | A collection of fields that describe the number of credits that you have remaining over a subsequent time period based on the rate limit. | |
x-ratelimit-remaining.minute | The number of credits that you have available in the next minute. | 1200 |
x-ratelimit-remaining.day | The number of credits that you have available in the next day. | 12000 |
x-ratelimit-remaining.month | The number of credits that you have available in the next month. | 120000 |
x-ratelimit-limit | A collection of fields that describe the maximum number of credits that you can use in a given time period. | |
x-ratelimit-limit.minute | The maximum number of credits that you can use in a minute. | 1201 |
x-ratelimit-limit.day | The maximum number of credits that you can use in a day. | 12001 |
x-ratelimit-limit.month | The maximum number of credits that you can use in a month. | 120001 |
x-lifetime-used | The total number of credits that you have used over an account’s lifetime. | 984152 |
x-totallimit-remaining | The total number of credits that you have available to consume, which includes both purchased and overage credits. | 1342 |
x-totallimit-purchased-remaining | The number of purchased credits that you have remaining. | 342 |
x-totallimit-overages-remaining | The number of overage credits that you have remaining. | 1000 |
If your account has a limit on the number of 200
API calls that you can make, once x-totallimit-remaining
reaches zero, all API requests will return 402
errors. Similarly, once x-ratelimit-remaining
reaches zero, all requests that you make will return 429
errors until the current rate limit window resets.
Since a given route can have multiple rate limits active, we will use the rate limit with the lowest time
granularity when your request does not breach any rate limits. If you have reached a rate limit, we'll return the reset time of that one in the response headers.
Account Request Limits
If you'd like to increase your account's
x-totallimit-limit
orx-ratelimit-limit
values, please contact your account manager or reach out to us at [email protected].
The API Dashboard
All accounts have access to our API Dashboard, which will allows you to manage your API keys, view usage and test new endpoints (when they are available.)
Response Size Limit
There is a 1MB size limit on all API responses. In practice, the type of requests that are most likely to hit this limit are those returning multiple full records (such as the Search APIs, the Bulk Person Enrichment API and the Bulk Person Retrieve API), particularly when requesting 80-100 records in a single response.
Here are some ways to avoid hitting this limit:
-
Add the
Accept-Encoding: gzip
header to your request headers; we will gzip-compress the responses, and they will be around five times smaller. -
Use the
data_include
input parameter to only return fields that you need (on endpoints that support this parameter.) -
Request fewer records per call. By requesting around 50 records instead of 100, you should keep API response sizes below the limit.
Updated 8 months ago