IP lookup: IPv4, IPv6 and caller address
GET /v1/ip/{ip}
Authentication: API key with lookup scope. Credits: 1 per completed lookup, including no match.
| Field or endpoint | Meaning |
|---|---|
| ip — required | Literal public IPv4 or IPv6. Hostnames, private, reserved and documentation ranges are rejected. |
| source — optional | canonical (default), all or an approved provider ID. all requires compare scope and costs 2 credits. |
| include=sources — optional | All-source comparison with compare scope. |
| fields — optional | Comma-separated top-level fields; provenance, attribution, warnings and usage fields remain. Projection does not reduce cost. |
curl --fail-with-body --max-time 10 'https://orig.ooo/v1/ip/8.8.8.8' -H "Authorization: Bearer $ORIGOOO_API_KEY"curl --fail-with-body --max-time 10 'https://orig.ooo/v1/ip/2001%3A4860%3A4860%3A8888?fields=country_code,asn,as_name' -H "Authorization: Bearer $ORIGOOO_API_KEY"Detect the caller
GET or POST /v1/ip/me
Authentication: lookup scope; browser keys require an allowed Origin. Credits: 1.
The service uses the connection address it sees. In browser code use POST with a publishable key. From a backend, me identifies that backend, not an end visitor. Validate and send the visitor IP explicitly when that is your intent.
const response = await fetch('https://orig.ooo/v1/ip/me', {
method: 'POST', credentials: 'omit',
headers: {'X-API-Key': 'YOUR_ORIGIN_BOUND_PUBLISHABLE_KEY'}
});
const body = await response.json();
if (!response.ok) throw new Error(body.error?.message || body.message || 'Lookup failed');
console.log(body.country_code);Success and failure
200 returns available data, with no guarantee of city or ASN coverage. 404 no_match means no matching range. Invalid/private input returns 400. Unavailable canonical data returns 503; an unavailable selected provider returns 409. Invalid credentials or missing scope return 401/403. See response fields and errors.
