Monitoring usage and spend
Did you know that as an API customer you can track your usage and billing in your Pipl account? The usage page shows a history of your queries and match rates. The billing page shows your previous invoices as well as your current spend, which is updated hourly. The current spend is displayed prior to applying any adjustments, refunds, or discounts.
You also can monitor your account proactively via code using the HTTP headers returned by every Search API response
Log Your Own API Usage
We recommend logging every API request, including search_ids, errors and warnings in order to improve your integration. These logs should be reviewed regularly.
Setting your API key quota
API keys do not have a specific quota when they are generated. Only a Pipl account administrator can set your API key quota.
To set a quota for the key you want to use:
- Go to your API keys page.
- Hover over the key you want to use to view the options menu for that key.
- Select ‘Set quota’ from the menu.
- The ‘Change Key Quota’ popup window will appear.
- Select the quota limit. The quota limit is the number of matches you want to allow for the quota period. Setting the quota to 0 will reset the quota.
- Select the quota period (hourly/daily/monthly).
- Press ‘Change’.
- The new quota you’ve set will show under the key.
API key quotas represent the number of matches for a given period of time. They allow you to set a budget per key and control your spend. We’ve provided an example below.
|Key||Price per match||Quota limit||Quota period||Quota per invoice|
Using the HTTP headers
The quota that you have set will be shown on every API response in the HTTP header as "X-APIKey-Quota-Alloted".
The date and time of the quota reset will show in the HTTP header as "X-Quota-Reset".
Every billable response—such as every match returned from the API—will be counted against the quota of the key used and will be shown in the HTTP header as "X-APIKey-Quota-Current".
Applying the example used in the table above, the headers will return as follows:
X-APIKey-Quota-Allotted 2000 X-Quota-Reset 2018-10-01 00:00:00 ##The end of the month## X-APIKey-Quota-Current 1
Use the three headers above to calculate relevant values for your business. For example:
- Calculate the number of queries you have left before your quota is reached:
Queries Remaining = X-APIKey-Quota-Alloted - X-APIKey-Quota-Current
- Calculate your spend on an API key during a quota period:
Spend = Price-per-match* x X-APIKey-Quota-Current
*Depending on the key you used
Updated 13 days ago