API URL
POST /api/v1/geocoding/forward
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
q
required
string
Forward geocoding search text trimmed and validated to length 1-256
limit
optional
number
Forward result limit constrained to 1-10
language
optional
string
Language preference applied to forward or reverse upstream lookup
countryCodes
optional
string
Forward country filters as comma-separated ISO alpha-2 codes
lat
required
number
Reverse geocoding latitude constrained to -90..90
lon
required
number
Reverse geocoding longitude constrained to -180..180
Example Request
Code
GET https://datpaq.com/api/v1/geocoding/forward?api_key=your-api-key&q=New%20YorkSuccessful Response
Status
HTML
200 OKBody
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"
}
}Field
Type
success
boolean
query
string
results
array
results[].confidence
object
count
number
lat
number
lon
number
address
object
fromCache
boolean
options
object
provider
string
meta
object
successCount
number
failureCount
number
statusCode
number
status
string
service
string
timestamp
string
version
string
offlineTests
boolean
correlationId
string
error
string
details
array
reason
string
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 operationLast Updated: May 4, 2026