OpenCage Geocoder provides a simple API for forward and reverse geocoding using open data sources.
OpenCage Geocoder provides a simple API for forward and reverse geocoding using open data sources. On Nagent, Opencage is exposed as a fully-configurable developer tools integration that any agent can call — 7 actions, and API key authentication. No code is required to wire Opencage into your workflow — connect it once via the External Integrations panel and reuse it across every agent you build.
Agent builders use Opencage to automate the kinds of tasks developer tools teams previously handled manually. Concrete examples — each one is a single agent step in Nagent — include:
Every action and trigger is paired with a structured input/output schema (visible in the sections below), so when you wire Opencage into Helix — our agentic agent builder — the editor knows exactly what each step expects and produces. Configure once, deploy anywhere across your Nagent agents.
Every operation an agent can call against Opencage, with input parameters and output schema. Drop these into any step of an agent built in Helix.
OPENCAGE_GEOCODE_FORWARDTool to convert a human-readable address into geographic coordinates. Use when you need to retrieve latitude and longitude from an address.
Input parameters
The address or free-form query to geocode
Return abbreviated results (0=false,1=true)
Maximum number of results (1-100)
Bias results to bounding box: west,south,east,north
Format the JSON response for readability
Preferred language for results (ISO 639-1 code)
Bias results near a point: latitude,longitude
Include original request in response (0=false,1=true)
Restrict to country codes (comma-separated ISO 3166-1 alpha-2)
Minimum confidence score (1-10)
Exclude supplementary information in results
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
OPENCAGE_GEOCODE_GEOJSONGeocode 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
Query string: either an address/placename for forward geocoding, or 'lat,lng' coordinates for reverse geocoding.
Use abbreviated address fields: 1 to enable, 0 to disable.
Maximum number of results to return (1-100). Default is 10.
Restrict results to bounding box as 'min_lng,min_lat,max_lng,max_lat'.
Pretty-print the JSON response for readability.
Preferred response language as IETF language tag (e.g., 'en', 'de', 'fr').
Include detailed road/driving information in annotations.
Bias results toward a location as 'lat,lng' (e.g., '52.5200,13.4050').
Include original request parameters in the response.
Restrict results to specific countries. Comma-separated ISO 3166-1 alpha-2 codes (e.g., 'us', 'de,fr').
Return only address-type results (exclude POIs, landmarks).
Minimum confidence level for results (1-10). Only results with confidence >= this value are returned.
Exclude detailed annotations (timezone, currency, sun times, etc.) from response.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
OPENCAGE_GEOCODE_GEOJSONPGeocode 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
The address or location query to geocode (e.g., 'Berlin, Germany' or '1600 Pennsylvania Ave, Washington DC')
Abbreviate place names in results. Set to 1 to abbreviate (e.g., 'NYC' instead of 'New York City'), 0 for full names.
Maximum number of results to return (1-100). Defaults to 10 if not specified.
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.
Format JSON output with indentation for readability. Set to 1 to enable. For debugging only.
Name of the JavaScript callback function to wrap the response (e.g., 'handleGeocode')
Preferred language for results using ISO 639-1 language code (e.g., 'en' for English, 'de' for German).
Disable automatic deduplication of results. Set to 1 to include potential duplicates.
Do not log this request in your account history. Set to 1 to disable logging.
Bias results towards a specific location, specified as 'lat,lng'. Example: '51.952,-1.162' for near Oxford, UK.
Include the original request parameters in the response. Set to 1 to include.
Limit results to a specific country using ISO 3166-1 alpha-2 country code (e.g., 'US', 'DE', 'GB').
Minimum confidence score (0-10) for results. Higher values return more precise matches only.
Exclude supplementary annotations (timezone, currency, etc.) from results. Set to 1 to exclude.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
OPENCAGE_GEOCODE_GOOGLE_V3_JSONTool to perform forward geocoding and return results in Google Geocoding API v3 compatible JSON format. Use when you need Google v3 compatible output for legacy integrations. Note: This is a legacy format that may be discontinued; using the standard JSON format is recommended.
Input parameters
The query string to be geocoded. Either latitude,longitude for reverse geocoding or a placename/address for forward geocoding. Must be URL encoded.
When set to 1, attempt to abbreviate and shorten the formatted string returned
Maximum number of results to return. Default is 10, max is 100. Only applies to forward geocoding.
Restrict forward geocoding results to a bounding box. Format: min_lng,min_lat,max_lng,max_lat
When set to 1, results are pretty printed for easier reading
IETF format language code (e.g., es, pt-BR) or 'native' for local language(s)
When set to 1, attempt to match the nearest road and fill additional roadinfo annotation
When set to 1, results will not be deduplicated
When set to 1, the query contents are not logged for privacy
Bias forward geocoding results towards a location. Format: latitude,longitude
When set to 1, the various request parameters are added to the response for debugging
Restrict forward geocoding results to specific countries. ISO 3166-1 Alpha 2 codes, comma-separated for multiple
When set to 1, include only the address (excluding POI names) in the formatted string
When set to 1, results will not contain annotations
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
OPENCAGE_GEOCODE_REVERSETool to convert coordinates to a human-readable address. Use when you have latitude and longitude and need a readable location.
Input parameters
Latitude and longitude as a comma-separated string, e.g., '51.952659,7.632473'
1 to abbreviate road and route types
Maximum number of results to return (1-10)
1 for pretty-printed JSON, 0 (default) for compact output
Preferred response language as ISO 639-1 code, e.g., 'en'
1 to include road information in the response
1 to include request parameters in the response
Restrict results to one or more ISO 3166-1 alpha-2 country codes separated by commas
1 to normalize city names
Minimum confidence level (0-10) to filter results
1 to exclude annotations in the response
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
OPENCAGE_GEOCODE_XMLGeocode 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
Location query: use an address or place name for forward geocoding, or 'lat,lng' coordinates for reverse geocoding
Set to 1 to return abbreviated address components (e.g., 'CA' instead of 'California')
Maximum number of results to return (1-100). Default is 10 if not specified
Set to 1 for human-readable formatted XML output, 0 or omit for compact output
IETF language tag for results (e.g., 'en' for English, 'de' for German, 'fr' for French)
Set to 1 to include detailed road and driving information for the location
Set to 1 to return all results including duplicates, 0 or omit to deduplicate
Set to 1 to include original request parameters in the response for debugging
Restrict results to specific countries using comma-separated ISO 3166-1 alpha-2 codes (e.g., 'us,ca' for USA and Canada)
Filter results to only include those with confidence score at or above this value (1-10, where 10 is highest)
Set to 1 to exclude supplementary annotations (timezone, currency, etc.), 0 or omit to include
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
OPENCAGE_PING_OPENCAGETool 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 from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
No publicly available marketplace agent is found using this tool yet. There are 46 agents privately built on Nagent that already use Opencage.
Build on Nagent
Connect Opencage to any Nagent agent in minutes — no API key management, no boilerplate. Just configure and deploy.
The five questions agent builders ask before adopting a new integration.
Open the External Integrations panel inside Nagent (app.nagent.ai/externalIntegration), find Opencage, and click "Connect Now." You'll authenticate with an API key — Nagent handles credential storage and refresh automatically. Once connected, Opencage is available to any agent in your workspace.
No. Nagent provides no-code integration for every tool. Once Opencage is connected, you configure its 7 actions directly in the agent builder UI — no API calls, no boilerplate, no schema management.
Helix — Nagent's agentic agent builder — lets you drop Opencage steps into any workflow visually. Pick an action (e.g., one of those listed above), fill in the inputs (Helix knows the required vs. optional schema for each parameter), and connect it to upstream/downstream steps. Triggers run as the entry point of an agent, so when a Opencage event fires, the agent kicks off automatically.
Every Opencage action and trigger ships with a fully-typed schema — input parameters with name, type, required flag, and description, plus the output payload shape. The schemas are documented in the sections above. Helix uses these schemas to validate your configuration at build time and to type-check the data flowing between steps.
Yes. While Opencage ships with 7 pre-built developer tools actions, you can layer custom logic around them inside Helix — pre/post-processing steps, conditional branches, retries, or stitching Opencage together with other connected tools. For deeper customization, talk to our team about Nagent's Agentic AI Lab — forward-deployed engineers who build Opencage-based workflows tailored to your business.