API URL
GET /api/v1/country-codes/countries
Headers
Code
Content-Type: application/jsonQuery Parameters
Param
Type
Description
code
required
string
Country identifier for code lookup endpoint
q
required
string
Search term for search and match endpoints
format
optional
string
Export format selector for export endpoint
Example GET Request
Code
GET https://datpaq.com/api/v1/country-codes/countries?api_key=your-api-keySuccessful Response
Status
HTML
200 OKBody
Code
{
"success": true,
"data": {
"countryName": "United States of America",
"iso2": "US",
"iso3": "USA",
"numericCode": 840
},
"meta": {
"lookupType": "code",
"timestamp": "2026-06-09T00:00:00.000Z",
"correlationId": "req_abc123def456"
}
}Field
Type
success
boolean
data
array
data
object
countryName
string
iso2
string
iso3
string
numericCode
number
meta
object
meta.count
number
meta.query
string
meta.limit
number
meta.lookupType
string
meta.matchType
string
meta.similarity
number
meta.format
string
meta.timestamp
string
meta.correlationId
string
error
string
Error Response
Example
Code
400 ValidationError - Missing q query parameter for search or match endpoint: Request rejected because required search input was not provided
401 AuthenticationError - Gateway authentication failure: Request rejected due to missing or invalid API credentials
404 NotFound - No country resolved for code or match input: Lookup completed with no matching country record
500 InternalError - Database or runtime processing failure: Request failed during internal query or response processingLast Updated: May 4, 2026