Documentation

API URL


POST /api/v1/ip-geolocation

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
GET https://datpaq.com/api/v1/ip-geolocation/batch?api_key=your-api-key&ip=8.8.8.8,1.1.1.1,208.67.222.222

Successful Response

Status
HTML
200 OK
Body
Code
{
  "ip": "8.8.8.8",
  "location": {
    "country": "United States",
    "region": "California",
    "city": "Mountain View",
    "latitude": 37.4056,
    "longitude": -122.0775
  },
  "network": {
    "network": "8.8.8.0/24",
    "asn": "AS15169",
    "org": "Google LLC"
  }
}

Error Response

Example
Code
400 ValidationError - Missing or invalid single ip parameter: Single lookup requires a syntactically valid IP
400 ValidationError - Missing batch ip input: Batch lookup requires ip input in endpoint-specific format
400 ValidationError - Batch size exceeds 100: Batch lookup enforces maximum of 100 IPs
400 ValidationError - Batch input is empty: Batch lookup requires at least one IP
401 AuthenticationError - Missing or invalid API credentials: Gateway authentication rejected request
404 NotFound - Valid IP not found in dataset: Lookup query returned no matching CIDR record
415 UnsupportedMediaType - POST content type is not application/json: POST endpoints only accept application/json
500 InternalServerError - Database or runtime error during lookup: Service failed while processing request

Last Updated:  May 4, 2026