> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Opencage

> OpenCage Geocoder provides a simple API for forward and reverse geocoding using open data sources.

![Opencage logo](https://mintcdn.com/composio-preview/gqjBKmmJCINafaiK/images/toolkits/opencage.svg?fit=max\&auto=format\&n=gqjBKmmJCINafaiK\&q=85\&s=a269ec9c03d7f095b54612e655fabd55)

* **Category:** developer tools
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 7
* **Triggers:** 0
* **Slug:** `OPENCAGE`
* **Version:** 20261101\_00

## Tools

> [accordion] Forward Geocode Address
>
> **Slug:** `OPENCAGE_GEOCODE_FORWARD`
>
> Geocode an address or place name to find geographic coordinates and related location details. Forward searches can return multiple matches; optionally restrict results by country or bounding box, bias them toward a location, or choose a preferred language and result limit.
>
> #### Input Parameters
>
> **q** `string` *required*
>
> The address or free-form query to geocode
>
> **abbrv** `integer`
>
> Return abbreviated results (0=false,1=true)
>
> **limit** `integer`
>
> Maximum number of results (1-100)
>
> **bounds** `string`
>
> Bias results to bounding box: west,south,east,north
>
> **pretty** `boolean`
>
> Format the JSON response for readability
>
> **language** `string`
>
> Preferred language for results (ISO 639-1 code)
>
> **proximity** `string`
>
> Bias results near a point: latitude,longitude
>
> **add\_request** `integer`
>
> Include original request in response (0=false,1=true)
>
> **countrycode** `string`
>
> Restrict to country codes (comma-separated ISO 3166-1 alpha-2)
>
> **min\_confidence** `integer`
>
> Minimum confidence score (1-10)
>
> **no\_annotations** `boolean`
>
> Exclude supplementary information in results
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Geocode to GeoJSON
>
> **Slug:** `OPENCAGE_GEOCODE_GEOJSON`
>
> Geocode addresses or coordinates and return results in GeoJSON FeatureCollection format. Use this tool when you need: - Geographic data in standard GeoJSON format for mapping applications - Forward geocoding: convert addresses to coordinates - Reverse geocoding: convert coordinates to addresses The response includes coordinates, formatted addresses, and optional annotations like timezone, currency, and sun times for each location.
>
> #### Input Parameters
>
> **q** `string` *required*
>
> Query string: either an address/placename for forward geocoding, or 'lat,lng' coordinates for reverse geocoding.
>
> **abbrv** `integer`
>
> Use abbreviated address fields: 1 to enable, 0 to disable.
>
> **limit** `integer`
>
> Maximum number of results to return (1-100). Default is 10.
>
> **bounds** `string`
>
> Restrict results to bounding box as 'min\_lng,min\_lat,max\_lng,max\_lat'.
>
> **pretty** `boolean`
>
> Pretty-print the JSON response for readability.
>
> **language** `string`
>
> Preferred response language as IETF language tag (e.g., 'en', 'de', 'fr').
>
> **roadinfo** `boolean`
>
> Include detailed road/driving information in annotations.
>
> **proximity** `string`
>
> Bias results toward a location as 'lat,lng' (e.g., '52.5200,13.4050').
>
> **add\_request** `boolean`
>
> Include original request parameters in the response.
>
> **countrycode** `string`
>
> Restrict results to specific countries. Comma-separated ISO 3166-1 alpha-2 codes (e.g., 'us', 'de,fr').
>
> **address\_only** `boolean`
>
> Return only address-type results (exclude POIs, landmarks).
>
> **min\_confidence** `integer`
>
> Minimum confidence level for results (1-10). Only results with confidence >= this value are returned.
>
> **no\_annotations** `boolean`
>
> Exclude detailed annotations (timezone, currency, sun times, etc.) from response.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Geocode with JSONP
>
> **Slug:** `OPENCAGE_GEOCODE_GEOJSONP`
>
> Geocode an address and return results wrapped in a JavaScript callback function (JSONP format). Use this tool when you need geocoding results that can be directly consumed by JavaScript through a callback function, typically for cross-domain AJAX requests in browser environments. The response wraps standard geocoding JSON with your specified callback function name. Example response: myCallback(\{"results":\[\{"geometry":\{"lat":52.5,"lng":13.4},"formatted":"Berlin, Germany",...}],...})
>
> #### Input Parameters
>
> **q** `string` *required*
>
> The address or location query to geocode (e.g., 'Berlin, Germany' or '1600 Pennsylvania Ave, Washington DC')
>
> **abbrv** `integer`
>
> Abbreviate place names in results. Set to 1 to abbreviate (e.g., 'NYC' instead of 'New York City'), 0 for full names.
>
> **limit** `integer`
>
> Maximum number of results to return (1-100). Defaults to 10 if not specified.
>
> **bounds** `string`
>
> Restrict results to a geographic bounding box, specified as 'minLng,minLat,maxLng,maxLat' (west,south,east,north). Example: '-0.563,51.280,0.278,51.686' for Greater London.
>
> **pretty** `integer`
>
> Format JSON output with indentation for readability. Set to 1 to enable. For debugging only.
>
> **callback** `string` *required*
>
> Name of the JavaScript callback function to wrap the response (e.g., 'handleGeocode')
>
> **language** `string`
>
> Preferred language for results using ISO 639-1 language code (e.g., 'en' for English, 'de' for German).
>
> **no\_dedupe** `integer`
>
> Disable automatic deduplication of results. Set to 1 to include potential duplicates.
>
> **no\_record** `integer`
>
> Do not log this request in your account history. Set to 1 to disable logging.
>
> **proximity** `string`
>
> Bias results towards a specific location, specified as 'lat,lng'. Example: '51.952,-1.162' for near Oxford, UK.
>
> **add\_request** `integer`
>
> Include the original request parameters in the response. Set to 1 to include.
>
> **countrycode** `string`
>
> Limit results to a specific country using ISO 3166-1 alpha-2 country code (e.g., 'US', 'DE', 'GB').
>
> **min\_confidence** `integer`
>
> Minimum confidence score (0-10) for results. Higher values return more precise matches only.
>
> **no\_annotations** `integer`
>
> Exclude supplementary annotations (timezone, currency, etc.) from results. Set to 1 to exclude.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Geocode Google v3 JSON
>
> **Slug:** `OPENCAGE_GEOCODE_GOOGLE_V3_JSON`
>
> Request forward geocoding in OpenCage's Google v3-compatible JSON format for legacy integrations. This format may be discontinued; OpenCage recommends using its standard JSON format instead.
>
> #### Input Parameters
>
> **q** `string` *required*
>
> The query string to be geocoded. Either latitude,longitude for reverse geocoding or a placename/address for forward geocoding. Must be URL encoded.
>
> **abbrv** `integer ("0" | "1")`
>
> When set to 1, attempt to abbreviate and shorten the formatted string returned
>
> **limit** `integer`
>
> Maximum number of results to return. Default is 10, max is 100. Only applies to forward geocoding.
>
> **bounds** `string`
>
> Restrict forward geocoding results to a bounding box. Format: min\_lng,min\_lat,max\_lng,max\_lat
>
> **pretty** `integer ("0" | "1")`
>
> When set to 1, results are pretty printed for easier reading
>
> **language** `string`
>
> IETF format language code (e.g., es, pt-BR) or 'native' for local language(s)
>
> **roadinfo** `integer ("0" | "1")`
>
> When set to 1, attempt to match the nearest road and fill additional roadinfo annotation
>
> **no\_dedupe** `integer ("0" | "1")`
>
> When set to 1, results will not be deduplicated
>
> **no\_record** `integer ("0" | "1")`
>
> When set to 1, the query contents are not logged for privacy
>
> **proximity** `string`
>
> Bias forward geocoding results towards a location. Format: latitude,longitude
>
> **add\_request** `integer ("0" | "1")`
>
> When set to 1, the various request parameters are added to the response for debugging
>
> **countrycode** `string`
>
> Restrict forward geocoding results to specific countries. ISO 3166-1 Alpha 2 codes, comma-separated for multiple
>
> **address\_only** `integer ("0" | "1")`
>
> When set to 1, include only the address (excluding POI names) in the formatted string
>
> **no\_annotations** `integer ("0" | "1")`
>
> When set to 1, results will not contain annotations
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Reverse Geocode Coordinates
>
> **Slug:** `OPENCAGE_GEOCODE_REVERSE`
>
> Reverse geocode a latitude and longitude to find a readable location and address details. The response contains at most one match and may include its distance from the requested coordinates. You can choose a preferred language or request a match to the nearest road.
>
> #### Input Parameters
>
> **q** `string` *required*
>
> Latitude and longitude as a comma-separated string, e.g., '51.952659,7.632473'
>
> **abbrv** `integer`
>
> 1 to abbreviate road and route types
>
> **limit** `integer`
>
> Maximum number of results to return (1-10)
>
> **pretty** `integer`
>
> 1 for pretty-printed JSON, 0 (default) for compact output
>
> **language** `string`
>
> Preferred response language as ISO 639-1 code, e.g., 'en'
>
> **roadinfo** `integer`
>
> 1 to include road information in the response
>
> **add\_request** `integer`
>
> 1 to include request parameters in the response
>
> **countrycode** `string`
>
> Restrict results to one or more ISO 3166-1 alpha-2 country codes separated by commas
>
> **normalizecity** `integer`
>
> 1 to normalize city names
>
> **min\_confidence** `integer`
>
> Minimum confidence level (0-10) to filter results
>
> **no\_annotations** `integer`
>
> 1 to exclude annotations in the response
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Geocode XML
>
> **Slug:** `OPENCAGE_GEOCODE_XML`
>
> Geocode a location query and return results in XML format. Supports both forward geocoding (address to coordinates) and reverse geocoding (coordinates to address). Use this when you need XML-formatted output instead of JSON.
>
> #### Input Parameters
>
> **q** `string` *required*
>
> Location query: use an address or place name for forward geocoding, or 'lat,lng' coordinates for reverse geocoding
>
> **abbrv** `integer ("0" | "1")`
>
> Set to 1 to return abbreviated address components (e.g., 'CA' instead of 'California')
>
> **limit** `integer`
>
> Maximum number of results to return (1-100). Default is 10 if not specified
>
> **pretty** `integer ("0" | "1")`
>
> Set to 1 for human-readable formatted XML output, 0 or omit for compact output
>
> **language** `string`
>
> IETF language tag for results (e.g., 'en' for English, 'de' for German, 'fr' for French)
>
> **roadinfo** `integer ("0" | "1")`
>
> Set to 1 to include detailed road and driving information for the location
>
> **no\_dedupe** `integer ("0" | "1")`
>
> Set to 1 to return all results including duplicates, 0 or omit to deduplicate
>
> **add\_request** `integer ("0" | "1")`
>
> Set to 1 to include original request parameters in the response for debugging
>
> **countrycode** `string`
>
> Restrict results to specific countries using comma-separated ISO 3166-1 alpha-2 codes (e.g., 'us,ca' for USA and Canada)
>
> **min\_confidence** `integer`
>
> Filter results to only include those with confidence score at or above this value (1-10, where 10 is highest)
>
> **no\_annotations** `integer ("0" | "1")`
>
> Set to 1 to exclude supplementary annotations (timezone, currency, etc.), 0 or omit to include
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Check API Health
>
> **Slug:** `OPENCAGE_PING_OPENCAGE`
>
> Tool to check API health and connectivity. Returns 'pong' if the API is reachable. Use when you need to verify that the OpenCage API is accessible and operational.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
