Skip to main content

Search Localities

This endpoint searches localities

info

This operation does not require authentication

HTTP Request

GET /api/v2/locality/search/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page
offsetqueryintegerfalseThe initial index from which to return the results
searchquerystringfalseA search term

Example Request

const headers = {
'Accept':'application/json'
};

fetch('/api/v2/locality/search/',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» countintegerfalsenoneTotal number of results
» nextstring(uri)¦nullfalsenoneNext page url
» previousstring(uri)¦nullfalsenonePrevious page url
» resultslist(Locality)falsenoneList of results

Example responses

{
"count": "integer",
"next": "string(uri)",
"previous": "string(uri)",
"results": [
{
"full_address": "string",
"postal_code": "string",
"town": "string",
"province": "string",
"province_short": "string",
"region": "string",
"country": "string",
"lat": "integer",
"lng": "integer"
}
]
}