Geocoding

Version: 3.1.2
address/geocoding
superface

Code or decode a postal address to or from geographical coordinates.

Geocode address

Geocode a postal address into geographical coordinates (latitude and longitude).

Query
Street address
Locality
Region
Country
Postal code
Latitude
Longitude

Reverse geocode

Decodes geographical coordinates (latitude and longitude) into a postal address.

Latitude
Longitude
Country
Region
Locality
Street address
Postal code
Formatted address

1. Install

npx @superfaceai/cli install address/geocoding

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('address/geocoding');

  // Use the profile
  const result = await profile
    .getUseCase('Geocode')
    .perform({
      query: '1600 Amphitheatre Parkway, Mountain View, CA'
    });

  return result.unwrap();
}

run();

3. Add providers