How do I authenticate with this API?
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Resolve any IPv4 or IPv6 address to country, region, city, latitude/longitude, ASN, and organization. PostgreSQL-backed for speed — single calls or batches up to 100.
Why IP Geolocation API
/api/v1/ip-geolocation
Single or batch, GET or POST — call shape your codebase already speaks.
| Parameter | Type | Required | Description |
|---|---|---|---|
| ip | string | array | yes | Single IP ("8.8.8.8"), comma-separated list, or JSON array (POST) up to 100 IPs. |
| include_logs | boolean | no | Enable database logging for successful lookups (batch). |
| api_key | string | yes | API key via query string. Alternatively pass as x-api-key header. |
GET for single IPs, POST for batches with a JSON body. Mix IPv4 and IPv6 freely.
GET https://datpaq.com/api/v1/ip-geolocation?api_key=YOUR_API_KEY&ip=8.8.8.8
POST https://datpaq.com/api/v1/ip-geolocation/batch
Content-Type: application/json
{
"ip": ["8.8.8.8", "1.1.1.1", "208.67.222.222"],
"include_logs": false
}Error reference
Single-IP errors return a JSON error object. Batch responses surface invalid items in an invalid_ips array so the rest still processes.
{
"error": "Batch size exceeds maximum of 100 IPs",
"requested": 150,
"maximum": 100
}FAQ
Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.
Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.
Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.
Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.
Resolve any IPv4 or IPv6 to city, ASN, and coordinates. One single endpoint, one batch endpoint, the same bearer auth as the rest of the catalog.