opencage-geocoding

v1.0.2
com.mcparmory/opencage-geocoding Checked 4 days ago Published 6 months ago

Convert addresses to coordinates and reverse-geocode locations worldwide

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_location Search Location

Search for geographic locations by address, place name, or coordinates and return detailed geocoding results in JSON format.

ParameterTypeDescription
q *stringThe location to geocode: either a place name (e.g., 'Times Square, New York, USA'), landmark name (e.g., 'Eiffel Tower'), or coordinates in lat,lng format. Minimum 2 characters.
abbrvbooleanWhen enabled, abbreviates the formatted address field in results (e.g., 'USA' instead of 'United States of America').
address_onlybooleanWhen enabled, returns only the address portion in the formatted field, excluding additional details like business names or landmarks.
boundsstringRestricts results to a geographic area using a bounding box defined by southwest and northeast corner coordinates in lat,lng format.
countrycodestringLimits results to specific countries using a comma-separated list of ISO 3166-1 Alpha 2 country codes (e.g., 'de' for Germany, 'ch,li' for Switzerland and Liechtenstein).
languagestringSets the language for results using an IETF language code (e.g., 'de' for German, 'pt-BR' for Brazilian Portuguese) or 'native' to use the location's native language.
limitintegerMaximum number of results to return, between 1 and 100. Defaults to 10 results.
proximitystringBiases results toward a specific location using coordinates in lat,lng format, prioritizing nearby matches.
roadinfobooleanWhen enabled, geocodes to the nearest road and includes detailed road information in the results.

search_location_xml Search Location XML

Geocode a location query or coordinate pair and return results in XML format. Supports forward geocoding (address to coordinates) and reverse geocoding (coordinates to address).

ParameterTypeDescription
q *stringThe location to geocode: either a place name/address (e.g., 'Times Square, New York, USA') or latitude,longitude coordinates (e.g., '52.5432379, 13.4142133'). Minimum 2 characters.
abbrvbooleanWhen enabled, abbreviates the formatted address field in results (e.g., 'St' instead of 'Street').
address_onlybooleanWhen enabled, returns only the address portion in the formatted field, excluding additional details.
boundsstringRestricts results to a geographic bounding box defined by southwest and northeast corner coordinates in the format: min_longitude,min_latitude,max_longitude,max_latitude.
countrycodestringLimits results to specific countries using a comma-separated list of ISO 3166-1 Alpha 2 country codes (e.g., 'de' for Germany, 'ch,li' for Switzerland and Liechtenstein).
languagestringReturns results in the specified language using IETF language codes (e.g., 'de' for German, 'pt-BR' for Brazilian Portuguese), or 'native' for the region's native language.
limitintegerMaximum number of results to return, between 1 and 100. Defaults to 10 if not specified.
proximitystringBiases results toward a specific location using latitude,longitude coordinates, prioritizing nearby matches.
roadinfobooleanWhen enabled, geocodes to the nearest road and includes road information annotations in the results.

search_geojson Search GeoJSON

Search for geographic locations and return results in GeoJSON format. Supports geocoding by address, place name, or coordinates with optional filtering and result customization.

ParameterTypeDescription
q *stringThe location to geocode: either a place name (e.g., 'Times Square, New York, USA'), landmark name (e.g., 'Eiffel Tower'), or coordinates in lat,lng format. Minimum 2 characters required.
address_onlybooleanWhen enabled, limits the formatted field in results to address details only, excluding other metadata.
boundsstringRestrict results to a geographic area by specifying a bounding box as four coordinates: southwest corner latitude, southwest corner longitude, northeast corner latitude, northeast corner longitude.
countrycodestringLimit results to specific countries by providing a comma-separated list of ISO 3166-1 Alpha 2 country codes (e.g., 'de' for Germany, 'ch,li' for Switzerland and Liechtenstein).
languagestringReturn results in a specific language using IETF language codes (e.g., 'de' for German, 'pt-BR' for Brazilian Portuguese), or use 'native' for the location's native language.
limitintegerMaximum number of results to return. Must be between 1 and 100; defaults to 10 if not specified.
proximitystringBias results toward a specific location by providing coordinates in lat,lng format. Useful for prioritizing results near the user's current location.
roadinfobooleanWhen enabled, geocodes to the nearest road and includes detailed road information in the results.