Quickstart

1. Create an account and a project

Sign up at my.terrarelay.eu, create an organization and add a project. A project groups your API keys and your usage.

2. Create an API key

Open the project and create an API key. The key is shown once, right after you create it. Copy it to a safe place on your server, such as a secret store. If you lose it, create a new key and revoke the old one.

3. Send a forward request

/search requires the countrycodes parameter. Send the key in the Authorization header.

curl -H "Authorization: Bearer <api-key>" \
  "https://api.terrarelay.eu/search?q=Damrak+1+Amsterdam&countrycodes=nl&format=jsonv2"

To search in several countries, separate the codes with a comma, for example countrycodes=nl,be.

4. Send a reverse request

/reverse takes coordinates, so it does not need countrycodes.

curl -H "Authorization: Bearer <api-key>" \
  "https://api.terrarelay.eu/reverse?lat=52.3745&lon=4.8981&format=jsonv2"

5. Show the attribution

The results are built on OpenStreetMap data and other sources. If you show or store results, include the attribution the sources require. See How it works for the details.

Next steps