Advance Data


Advanced Data

Embeddable Maps

Each API response will carry a map_url object containing a URL leading to an embeddable map associated with your geocoding result. This map can be embedded using an iframe element on your website or in your application.

Example map_url Object:

Please note: This feature is only available on the Basic Plan and higher.

Country Module

As part of the Country Module, the positionstack API is capable of returning an extensive set of country information along with both forward and reverse geocoding requests. To enable the Country Module, simply append the API's country_module HTTP GET parameter to your API request URL and set it to 1.

Example API Request:

Sign Up to Run API Request

Example country_module Object:

Please note: For readability purposes we have reduced the above example API response to show only one geocoding result and skipped any objects before and after the country_module object shown above.

country_module Sub-Objects Explained:

Response ObjectDescription
latitudeReturns the country's latitude coordinate.
longitudeReturns the country's longitude coordinate.
common_nameReturns the common name of the country associated with the location result.
official_nameReturns the official name of the country associated with the location result.
capitalReturns the capital of the country associated with the location result.
flagReturns a flag icon of the country associated with the location result.
landlockedReturns true or false depending on whether or not the country is landlocked.
independentReturns true or false depending on whether or not the country is independent.
global > alpha2Returns the ISO 3166 Alpha 2 code of the country associated with the location result.
global > alpha3Returns the ISO 3166 Alpha 3 code of the country associated with the location result.
global > numeric_codeReturns the numeric ISO 3166 code of the country associated with the location result.
global > regionReturns the country's region name. Example: Americas
global > subregionReturns the country's sub-region name. Example: Northern America
global > world_regionReturns the country's world region name. Example: AMER
global > region_codeReturns the country's region name. Example: Americas
global > subregion_codeReturns the country's sub-region code. Example: 021
global > continent_nameReturns the continent name of the country associated with the location result.
global > continent_codeReturns the continent code of the country associated with the location result.
dial > calling_codeReturns the calling code of the country associated with the location result.
dial > national_prefixReturns the national calling prefix of the country associated with the location result.
dial > international_prefixReturns the international calling prefix of the country associated with the location result.
currenciesReturns an array of one or multiple currencies associated with the location result.
currencies > symbolReturns the currency symbol of the country associated with the location result.
currencies > codeReturns the currency code of the country associated with the location result.
currencies > nameReturns the currency name of the country associated with the location result.
currencies > numericReturns the numeric currency code of the country associated with the location result.
currencies > minor_unitReturns the minor currency unit of the country associated with the location result.
languagesReturns an array of one or multiple languages of the country associated with the location result.
languages > codeReturns the 2-letter language code of the given language.
languages > nameReturns the official name of the given language.

Sun Module

The API is capable of returning astrology data along with forward and reverse geocoding requests. To enable the Sun Module, simply append the API's sun_module HTTP GET parameter to your API request URL and set it to 1.

Example API Request:

Sign Up to Run API Request


 Example sun_module Object:

Please note: For readability purposes we have reduced the above example API response to show only one geocoding result and skipped any objects before and after the sun_module object shown above.

sun_module Sub-Objects Explained:

Response ObjectDescription
rise > timeReturns the sunrise time as a UNIX timestamp (UTC).
rise > astronomicalReturns the astronomical sunrise time as a UNIX timestamp (UTC).
rise > civilReturns the civil sunrise time as a UNIX timestamp (UTC).
rise > nauticalReturns the nautical sunrise time as a UNIX timestamp (UTC).
set > timeReturns the sunset time as a UNIX timestamp (UTC).
set > astronomicalReturns the astronomical sunset time as a UNIX timestamp (UTC).
set > civilReturns the civil sunset time as a UNIX timestamp (UTC).
set > nauticalReturns the nautical sunset time as a UNIX timestamp (UTC).
transitReturns the sun transit time as a UNIX timestamp (UTC).

Timezone Module

The API is capable of returning timezone information along with forward and reverse geocoding requests. To enable the Timezone Module, simply append the API's timezone_module HTTP GET parameter to your API request URL and set it to 1.

Example API Request:

Sign Up to Run API Request

Example timezone_module Object:

Please note: For readability purposes we have reduced the above example API response to show only one geocoding result and skipped any objects before and after the timezone_module object shown above.

timezone_module Sub-Objects Explained:

Response ObjectDescription
nameReturns the common name of the timezone.
offset_secReturns GMT offset of the timezone in seconds.
nameReturns GMT offset of the timezone as a string.

Bounding Box Module

For many geocoding requests the API is capable of returning accurate bounding box coordinates. To enable the Bounding Box Module, simply append the API's bbox_module HTTP GET parameter to your API request URL and set it to 1.

Not sure about what a bounding box is? Read OpenStreetMap's Bounding Box Definition.

Example API Request:

Sign Up to Run API Request

Example bbox_module Object:

Please note: For readability purposes we have reduced the above example API response to show only one geocoding result and skipped any objects before and after the bbox_module object shown above.

bbox_module Sub-Objects Explained:

Response ObjectDescription
min_longitudeReturns the minimum longitude coordinate point associated with the location result.
min_latitudeReturns the minimum latitude coordinate point associated with the location result.
max_longitudeReturns the maximum longitude coordinate point associated with the location result.
max_latitudeReturns the maximum latitude coordinate point associated with the location result.

Important: Please note that not all geocoding requests will yield bounding box information.

 

Questions? Contact Sales .
Need help? Contact Support .
© 2025 APILayer. All rights reserved.