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 view the headers in your API response.
The API Dashboard
All accounts have access to our API Dashboard, which allows you to manage your API keys, view usage and test new endpoints (when available).
To check your credit usage on the dashboard, go to the Usage tab. Select the endpoint you want to check from the header row. You will see your Monthly Data Stats and Active Credit Usage for that endpoint on the page.
Check Rate Limits in Response Headers
To check your rate limit and credit usage for a particular endpoint via code, check the headers of the API response. Here's an example for checking the Person Enrichment API:
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'
// See https://github.com/peopledatalabs/peopledatalabs-js
const PDLJS = require('peopledatalabs');
const PDLJSClient = new PDLJS({ apiKey: 'YOUR API KEY' });
(async () => {
try {
const response = await PDLJSClient.person.enrichment({ profile: 'linkedin.com/in/linfluencer' });
console.log(response);
// Log the header
console.log(response.head);
} catch (error) {
console.log(error);
}
})();
To check any other endpoint, replace the URL with the new endpoint.
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 are used for this API, which will 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 API requests that you have remaining over a subsequent time period. | |
x-ratelimit-remaining.minute | The number of requests that you have available in the next minute. | 1200 |
x-ratelimit-remaining.day | The number of requests that you have available in the next day. | 12000 |
x-ratelimit-remaining.month | The number of requests that you have available in the next month. | 120000 |
x-ratelimit-limit | A collection of fields that describe the maximum number of API requests that you can make in a given time period. | |
x-ratelimit-limit.minute | The maximum number of requests that you can make in a minute. | 1201 |
x-ratelimit-limit.day | The maximum number of requests that you can make in a day. | 12001 |
x-ratelimit-limit.month | The maximum number of requests that you can make in a month. | 120001 |
x-lifetime-used | The total number of credits that you have used over your 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.
Increasing 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].
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 or the Bulk Person Enrichment 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 2 months ago