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:

  1. Go to your API keys page.
  2. Hover over the key you want to use to view the options menu for that key.
  3. Select ‘Set quota’ from the menu.
  4. The ‘Change Key Quota’ popup window will appear.
  5. 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.
  6. Select the quota period (hourly/daily/monthly).
  7. Press ‘Change’.
  8. 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.

KeyPrice per matchQuota limitQuota periodQuota per invoice
Business Premium$0.552000Monthly$1100

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:

  1. Calculate the number of queries you have left before your quota is reached:
    Queries Remaining = X-APIKey-Quota-Alloted - X-APIKey-Quota-Current
  2. 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