Sunsetting APIs

Geocoding

Convert addresses to geographic coordinates (forward geocoding) and coordinates back to human-readable addresses (reverse geocoding).

Forward Geocoding

Forward Geocoding is when you need to convert addresses (like a street address) into geographic coordinates (like latitude and longitude). You can then use these coordinates to do a number of things such as place markers on a map, calculate the distance between your office and those coordinates, send a drone over to that location, and so on.

This API will be deprecated on 1st April 2027. Please migrate to the LocationIQ Forward Geocoding API. LocationIQ is also an Unwired Labs product, and offers a more robust Geocoding and Maps platform.

Usage

curl --request GET \
  --url 'https://us1.unwiredlabs.com/v2/search?token=YOUR_API_TOKEN&q=SEARCH_STRING'

GET requests can be sent to the following URL:

https://us1.unwiredlabs.com/v2/search?token=YOUR_API_TOKEN&q=SEARCH_STRING

Replace us1 with a region that's closer to your location.

Query Parameters

NameDescriptionRequired
tokenAuthentication TokenYes
qAddress which we want to search forYes
accept-languagePreferred language order for showing search results. Read more.Optional
limitInteger value to limit the number of returned resultsOptional
countrycodesLimit search to a list of countries. Read more.Optional
viewboxThe preferred area to find search results. (left, right, top, bottom)Optional

Response

The above command returns JSON structured like this:

{
  "status": "ok",
  "balance": 5000,
  "address": [{
    "lat": "40.6892474",
    "lon": "-74.0445404280149",
    "display_name": "Statue of Liberty, Hudson River Waterfront Walkway, Jersey City, Hudson County, New Jersey, 10004, United States of America",
    "road": "Hudson River Waterfront Walkway",
    "county" : "Hudson County",
    "city": "Jersey City",
    "state": "New Jersey",
    "country": "United States of America",
    "country_code": "US",
    "postal_code": 10004
  }, {
    "lat": "41.3438648",
    "lon": "-86.3111653",
    "display_name": "Statue of Liberty, Rue Guynemer, Odéon, 6e, Paris, Île-de-France, 75006, France",
    "road": "Rue Guynemer",
    "city": "Île-de-France",
    "state": "Paris",
    "country":"France",
    "country_code" : "FR",
    "postal_code": 75006
  }]
}
NameDescription
statusok on success; error on error
balanceBalance left in the account
addressArray of Address objects found for the search query. Read more

Reverse Geocoding

Reverse geocoding is the process of converting geographic coordinates into a human-readable address.

This API will be deprecated on 1st April 2027. Please migrate to the LocationIQ Reverse Geocoding API. LocationIQ is also an Unwired Labs product, and offers a more robust Geocoding and Maps platform.

Usage

curl --request GET \
  --url 'https://us1.unwiredlabs.com/v2/reverse?token=YOUR_API_TOKEN&lat=LATITUDE&lon=LONGITUDE'

GET requests can be sent to the following URL:

https://us1.unwiredlabs.com/v2/reverse?token=YOUR_API_TOKEN&lat=LATITUDE&lon=LONGITUDE

Replace us1 with a region that's closer to your location.

Query Parameters

NameDescriptionRequired
tokenAuthentication tokenYes
latLatitude of the location addressYes
lonLongitude of the location addressYes
zoomZoom value lies between 0-18. Level of detail required where 0 is country and 18 is house/buildingOptional
accept-languagePreferred language order for showing search results. Read more.Optional

Response

The above command returns JSON structured like this:

{
  "status": "ok",
  "balance": 5000,
  "address": {
    "lat": "41.3438648",
    "lon": "-86.3111653",
    "display_name": "Southpark Lane, Littleton, Arapahoe County, Colorado, 80120, United States of America",
    "road": "Southpark Lane",
    "county": "Arapahoe County",
    "city": "Denver-Aurora-Lakewood",
    "state": "Colorado",
    "country": "United States of America",
    "country_code" : "US",
    "postal_code": 80120
  }
}
NameDescription
statusok on success; error on error
balanceBalance left in the account
addressAddress object found for the search query. Read more.

Notes

Address Object

NameDescription
latLatitude of the given location (decimal)
lonLongitude of the given location (decimal)
display_nameMatched Address name for the given location
house_numberHouse Number
roadRoad Name
neighbourhoodNeighbourhood
suburbSuburb
cityCity name (normalized form of city, town, village, hamlet)
countyCounty name (normalized form of county, state_district)
countryCountry name
country_codeCountry code
postcodePostal code

Accept Language

Preferred language order for showing search results, overrides the value specified in the Accept-Language HTTP header. Either uses standard rfc2616 accept-language string or a simple comma separated list of language codes.

  • List of Accept-Language codes: List of ISO 639-1 codes
  • Use ISO 639-1 Code (2 characters). If the language is not available, use ISO 639-2 Code (3 characters) from here
  • Default: en

Country Codes

Limit search results to a specific country (or a list of countries). Should be the ISO 3166-1 alpha-2 code. Here is a sample:

Country codeCountry
deGermany
gbUnited Kingdom
usUnited States of America

Errors

This API currently always responds with an HTTP 200 status code, even for errors - always check the status field in the response body. The exceptions are a missing scope, which returns HTTP 403 with ACCESS_RESTRICTED, and a server-side error, which returns HTTP 500 with UNKNOWN_ERROR.

{
  "status": "error",
  "message": "Error message"
}

When certain types of errors are encountered, the API responds with one of the following error messages:

Error MessageDescription
INVALID_TOKENThe user's token set is not valid or missing
INACTIVE_TOKENThe user's token is not active
ACCESS_RESTRICTEDThe access token does not have the scope required by this endpoint (geocoding:forward or geocoding:reverse). Returned with HTTP 403.
INVALID_REQUESTThe request does not contain the required input in the specified format
RATELIMITED_DAYThe user has reached the daily limit allocated
RATELIMITED_MINUTEThe user has reached the per-minute limit allocated
RATELIMITED_SECONDThe user has reached the per-second limit allocated
NO_MATCHESThe request is valid and we could not find a proper result
UNKNOWN_ERRORDue to a server error, we are unable to serve your request. You can retry this request.

On this page