3 lines to integrate every geocoding service

Always working, always the right provider, no effort, no maintenance
Get started in no time

Instant integration

We’ve built the integrations so you don’t have to. Save the time, get the best results.

Resilient by default

Automatically failover providers when things go wrong. Your integration will always work.

The right results

Some providers work better for different locations. Mix and match the providers without any effort.

You are in control

Keep track of your API usage and manage your integrations in the realtime without coding.

Geocode address

Convert a postal address into latitude and longitude.
const result = await superface.getUseCase('
Geocode
')
   .perform({
     query: 'United States',
   });
Calling the API ...
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Reverse geocode

Find an address based on latitude and longitude.
const result = await superface.getUseCase('
ReverseGeocode
')
   .perform({
     latitude: 37.423199,
     longitude: -122.084068
   });
Calling the API ...
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

All the providers at your service

Integrate every provider in 3 lines of code. Switch from one to another on the fly based on consumption, quality of results or price.

Instant integration,
free forever

Instant integration with built-in maintenance and monitoring will be always free. You may pay only for the geocoding service to the selected provider.

No maintenance

Integrate every service without any maintenance. Configure a backup provider and enjoy the time you've saved.

No proxy

Superface is not a proxy. The calls are always direct from your application to the selected provider. The privacy is yours.
The geocode integrations are powered by Superface and OneSDK. Superface provides a registry and monitoring of geocode integrations along with many other use cases you can use in your application.

The open sourced OneSDK is the only library you need in your code to access all of these integrations.
Create Superface Account

Install Geocode Use Case

Using the Superface CLI, install the use case "geocoding" from the Superface catalog to your project.
npx @superfaceai/cli install address/geocoding

Configure Geocode Provider

Azure Maps
npx @superfaceai/cli configure
azure-maps
-p address/geocoding
OpenCage
npx @superfaceai/cli configure
opencage
-p address/geocoding
Google Maps
npx @superfaceai/cli configure
google-apis-maps
-p address/geocoding
Mock
npx @superfaceai/cli configure
mock
-p address/geocoding

Ready-made Geocode Use Cases

geocode.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const { SuperfaceClient } = require('@superfaceai/one-sdk');

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

  const result = await profile.getUseCase('
Geocode
')

    .perform({
      
addressCountry: 'United States',
      addressLocality: 'San Francisco',
      postalCode: 'CA 94103',
      streetAddress: '325 Ninth Street',
    });

  try {
    const data = result.unwrap();
    console.log(data)
  } catch (error) {
    console.error(error)
  }
}
main();
reverse-geocode.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const { SuperfaceClient } = require('@superfaceai/one-sdk');

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

  const result = await profile.getUseCase('
ReverseGeocode
')

    .perform({
      
latitude: 37.423199,
      longitude: -122.084068
    });

  try {
    const data = result.unwrap();
    console.log(data)
  } catch (error) {
    console.error(error)
  }
}
main();