Errors, usage & quotas
Error codes
| Code | Meaning |
|---|---|
400 | Invalid POST body or unsupported bulk request format. invalid_asn on /api/asn, invalid_prefix on /api/prefix, invalid_ip on /api/assess. |
401 | Missing or invalid bearer API key. |
403 | key_restriction_failed — an origin, referrer, or client-IP restriction rejected the request. plan_required — the endpoint needs a higher plan (/api/assess needs Advanced or a trial). feature_unavailable — the feature is not available yet (whois=true). |
404 | not_found — the AS or prefix does not exist on /api/asn or /api/prefix. On /api, an individual IP that could not be resolved is returned inside the result array as a structured error object. |
413 | Bulk request exceeds the 1,000-address limit. |
429 | quota_exceeded (monthly allowance) or rate_limit_exceeded (per-client rate limit, with Retry-After). |
503 | Account configuration or a required enrichment provider is temporarily unavailable. |
A field is missing from my response
Fields your plan does not include are omitted from the result object. They are never returned as null and never raise an error — a null would silently coerce to 0 in most languages, which for a field like risk_score would read as “perfectly safe” and quietly break a fraud rule.
Three things tell you what happened:
gated_fields— an array on the result listing exactly what was withheld. When you usefields=, it lists only the fields you asked for and did not get.gated_fields_info— a link to the field comparison.X-IpQuery-Plan— a response header naming the plan the request resolved to. Present on every authenticated response; inspect it withcurl -sS -D - -o /dev/null -H "Authorization: Bearer YOUR_API_KEY" https://ipquery.info/api.
For example, requesting a paid field on the free plan:
[
{
"query_ip_address": "8.8.8.8",
"country": "United States",
"gated_fields": ["risk_score"],
"gated_fields_info": "Some fields are not included on your plan. See https://ipquery.info/pricing#fields"
}
]See which fields each plan includes. The 15 day free trial returns the complete dataset.
Usage, plans & quotas
Each plan includes a monthly request allowance. One single-IP request counts as one unit; a batch ipList or POST request counts as one unit per address, up to 1,000 addresses per request. /api/asn, /api/prefix and /api/assess cost one unit each; /api/meta is free. Your remaining allowance and reset cycle are always visible on your Statistics dashboard.
| Plan | Requests / month | Price |
|---|---|---|
| Free | 30,000 | $0, no card required |
| First 15 days | 30,000 | Every field included, no card required |
| Basic | 100,000 | $10 / month |
| Advanced | 1,500,000 | $50 / month |
| Business | 5,000,000 | $100 / month |
When a key exhausts its monthly allowance the API responds with 429 until the cycle resets or you upgrade on the Account & Billing page. See Pricing for full plan details.
Per-IP rate limiting
For keys used from the browser you can enable Rate Limit by IP Address on the API Keys page, which throttles any single caller to one request every five minutes — protecting your allowance from abuse without a back end.
Tagging requests
Add a tag (max 20 characters) to single or batch requests to segment your usage analytics by campaign, product, or traffic source. Tags appear as filters on your Statistics dashboard.
Machine-readable spec
An OpenAPI 3.1 description of every endpoint (/api, /api/asn, /api/prefix, /api/assess, /api/meta) is available at https://ipquery.info/openapi.yaml for use with code generators and API tooling.