Documentation
Everything you need to integrate Kestrel into your application.
Introduction
Kestrel is a REST API for reverse lookup and identity enrichment. Query by email, phone, or domain and get back structured JSON — names, addresses, phone numbers, DOB, and optional deep background enrichment.
All responses are JSON. Both GET and POST are supported on every endpoint.
Base URL
https://kestrelapi.com
GET and POST. For POST, send params as application/x-www-form-urlencoded.
Authentication
Pass your API key as api_key on every request — as a query string parameter or in the POST body. Keys are prefixed kst_.
GET request
GET https://kestrelapi.com/lookup/email?api_key=kst_your_key&q=john@example.com
POST request
POST https://kestrelapi.com/lookup/email
Content-Type: application/x-www-form-urlencoded
api_key=kst_your_key&q=john@example.com
User-Agent Requirement
User-Agent. Requests from HTTP libraries using their default agent are rejected with 403.
Accepted
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/122.0.0.0 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 Chrome/122.0.0.0 Safari/537.36
Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
Rejected
python-requests/2.32.3 — blocked
curl/7.68.0 — blocked
Go-http-client/1.1 — blocked
(empty / missing) — blocked
Email Lookup
Look up a person by email address. Returns name, DOB, addresses, phone numbers, and optional deep enrichment.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
| q | string | required | Email address to search |
| carrier | bool | optional | Phone carrier and line type +$0.0006 |
| deep | bool | optional | Deep enrichment via TLO — only charged on match +$0.0033 |
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
"https://kestrelapi.com/lookup/email?api_key=kst_your_key&q=john.doe@gmail.com&deep=1"Phone Lookup
Reverse search a phone number. Supports US and international numbers in E.164 or local format.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
| q | string | required | Phone number — e.g. +12125550100 or 2125550100 |
| carrier | bool | optional | Carrier and line type +$0.0006 |
| deep | bool | optional | Deep enrichment +$0.0033 |
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
"https://kestrelapi.com/lookup/phone?api_key=kst_your_key&q=%2B12125550100&carrier=1"Domain Search
Find contacts associated with a domain. Returns all people linked to that domain — useful for lead enrichment and business intelligence.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
| q | string | required | Domain name — e.g. example.com |
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
"https://kestrelapi.com/lookup/domain?api_key=kst_your_key&q=example.com"Account Balance
Returns the current prepaid balance for the API key.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
curl "https://kestrelapi.com/account/balance?api_key=kst_your_key"Access Logs
Returns recent search activity for the API key.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
| limit | integer | optional | Number of records — default 100, max 1000 |
curl "https://kestrelapi.com/account/logs?api_key=kst_your_key&limit=5"Deep Enrichment
Add deep=1 to any lookup to pull full background records via TLO. Requires first name, last name, city, and state to be present in the base result. If those fields are missing, deep is silently ignored and no charge is applied.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
| q | string | required | Email address to search |
| deep | bool | required | Set to 1 to enable TLO deep enrichment +$0.0033 on match |
| carrier | bool | optional | Also return carrier and line type +$0.0006 |
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
"https://kestrelapi.com/lookup/email?api_key=kst_your_key&q=john.doe@gmail.com&deep=1"Additional fields returned with deep=1
| Field | Description |
|---|---|
| confirmed_numbers | Phone numbers verified against TLO records |
| phone_numbers_full | Full phone details — line type, carrier, first seen, spam flag |
| all_names | Historical name variations with first/last seen dates |
| all_dobs | All dates of birth on record |
| related_persons | Family members and associates with relationship type |
| criminal_records | Court records — case numbers, crime types, charges |
| addresses_structured | Structured address data with county and zip+4 |
| alt_names | Additional name variations from TLO records |
| censored_numbers | Partially masked numbers from TLO |
Phone Recovery Verification
Add recovery_check=1 to an email lookup to verify phone numbers via email provider recovery systems. The API extracts phone numbers from the search result, then runs each recovery module to find a match. Processing stops on the first match to minimise cost.
| Parameter | Type | Description | |
|---|---|---|---|
| api_key | string | required | Your API key |
| q | string | required | Email address to search |
| recovery_check | bool | required | Set to 1 to enable Phone Recovery Verification |
| recovery_modules | object | optional | module_order[] and enabled_modules[] arrays. Uses profile defaults if omitted. |
curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
"https://kestrelapi.com/lookup/email?api_key=kst_your_key&q=john@yahoo.com&recovery_check=1"curl -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/122.0.0.0" \
"https://kestrelapi.com/lookup/email?api_key=kst_your_key&q=john@yahoo.com&recovery_check=1\
&recovery_modules[module_order][]=yahoo\
&recovery_modules[module_order][]=outlook\
&recovery_modules[module_order][]=icloud\
&recovery_modules[enabled_modules][]=yahoo\
&recovery_modules[enabled_modules][]=outlook\
&recovery_modules[enabled_modules][]=icloud"Supported modules & pricing
| Module | Price | Supported domains |
|---|---|---|
| icloud | $0.0040 | All domains |
| outlook | $0.0030 | All domains |
| yahoo | $0.0060 | yahoo.com and subdomains |
| aol | $0.0060 | aol.com and subdomains |
| xfinitycomcast | $0.0030 | comcast.com, xfinity.com |
| gmxmail | $0.0050 | mail.com, gmx.com, etc. |
| doordash | $0.0030 | All domains |
Response fields — recovery_check object
| Field | Type | Description |
|---|---|---|
| matched | boolean | Whether a phone number match was found |
| matched_number | string | The phone number that matched (if found) |
| matched_module | string | The provider module that found the match |
| modules_used | array | Modules that were executed (only these are charged) |
| cost | float | Total cost for recovery verification (sum of executed modules) |
Rate Limits
The API allows 20 requests per second per API key. Exceeding this returns 429 Too Many Requests. Back off and retry after at least 1 second.
| Limit | Value | Scope |
|---|---|---|
| req/s | 20 | Per API key |
Python — bulk at 20 req/s
# Stay within 20 req/s using a thread pool
import time
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=20) as pool:
for email in emails:
pool.submit(search, email)
time.sleep(0.05) # 1/20 = 0.05s between dispatches
Error Codes
All errors return a JSON body with an error field and an optional message.
| Code | Meaning |
|---|---|
| 200 | OK — request succeeded |
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 402 | Payment required — insufficient balance |
| 403 | Forbidden — bad User-Agent |
| 404 | Not found |
| 429 | Rate limited — too many requests |
| 500 | Server error — try again later |
Error response format
{
"error": "Insufficient balance",
"message": "Your account balance is too low to complete this request."
}