Documentation

API URL


POST /api/v1/geocoding/forward

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
GET https://datpaq.com/api/v1/geocoding/forward?api_key=your-api-key&q=New%20York

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "query": "New York",
  "results": [
    {
      "lat": 40.7128,
      "lon": -74.006,
      "displayName": "New York, New York, United States",
      "type": "city",
      "importance": 0.9,
      "confidence": {
        "score": 0.9,
        "level": "high"
      }
    }
  ],
  "count": 1,
  "fromCache": false,
  "options": {
    "limit": 3,
    "language": "en-US",
    "countryCodes": null,
    "viewbox": null,
    "bounded": false
  },
  "provider": "nominatim",
  "meta": {
    "correlationId": "req_abc123",
    "timestamp": "2026-07-07T00:00:00.000Z",
    "processingTime": "35ms",
    "provider": "nominatim"
  }
}

Error Response

Example
Code
400 ValidationError - Joi query validation failure: Invalid q lat or lon input rejected before provider processing
400 BodyValidationError - Joi body validation failure for batch endpoint: Invalid or missing batch query payload rejected before processing
401 AuthenticationError - Gateway rejects missing or invalid API key: Authentication failed before business route handling
403 AuthorizationError - Gateway access policy denies caller: Authenticated caller is not permitted for endpoint access
404 NotFound - Route not defined in geocoding service: Endpoint not found response from catch-all route
429 RateLimitError - Service limiter exceeded or provider reason rate-limited: Too many requests response with retryAfter
500 InternalError - Unhandled exception in route handler: Internal failure path with internal-error reason
502 UpstreamUnavailable - Provider non-success or network failure mapped to upstream-unavailable: Upstream dependency unavailable for geocoding operation

Last Updated:  May 4, 2026