opencage-api-client
    Preparing search index...

    Function geocode

    • geocode address and reverse geocode coordinates using OpenCage API requesting the json format.

      Parameters

      • input: GeocodingRequest

        the input query parameter as JSON object, the attribute q is required, the key can be omitted when using a proxyURL, and when using node with a dedicated environment variable (OPENCAGE_API_KEY). Others optional parameters can be found at OpenCage Data API documentation

      • Optionaloptions: GeocodingOptions

        the options object, the attribute signal is used to abort the request when the signal is aborted. the attribute proxyURL is used to proxy the request to a different URL.

      Returns Promise<GeocodingResponse>

      a promise resolved by the json format API payload