Skip to main content

What you need

  • An API key
  • An HTTP client (e.g. curl, or any HTTP library)
To get an API key:
  1. Sign up if you haven’t already
  2. Create an API key in the dashboard
All requests must include your API key as a Bearer token.

Make your first request

Send a GET request to the autocomplete endpoint with a country code and a partial address query. Example using curl:
curl "https://api.streetline.io/v1/address?country=NLD&q=hoofdstr&limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
In this example:
  • country specifies the country to search in
  • q is the partial address input typed by the user
  • limit controls how many suggestions are returned

Example response

{
  "hits": [
    {
      "components": [
        {
          "type": "NLD_PUBLIC_SPACE",
          "value": "Hoofdstraat"
        },
        {
          "type": "NLD_HOUSE_NUMBER",
          "value": 2
        },
        {
          "type": "NLD_HOUSE_LETTER",
          "value": "A"
        },
        {
          "type": "NLD_POSTAL_CODE",
          "value": "7311 KA"
        },
        {
          "type": "NLD_LOCALITY",
          "value": "Apeldoorn"
        },
        {
          "type": "NLD_MUNICIPALITY",
          "value": "Apeldoorn"
        },
        {
          "type": "NLD_PROVINCE",
          "value": "Gelderland"
        },
        {
          "type": "NLD_COUNTRY",
          "value": "Nederland"
        }
      ],
      "country": "NLD",
      "lines": [
        "Hoofdstraat 2A",
        "7311 KA Apeldoorn",
        "Nederland"
      ],
      "location": {
        "latitude": 52.209884,
        "longitude": 5.967036
      }
    },
    {
      "components": [
        {
          "type": "NLD_PUBLIC_SPACE",
          "value": "Hoofdstraat"
        },
        {
          "type": "NLD_HOUSE_NUMBER",
          "value": 7
        },
        {
          "type": "NLD_POSTAL_CODE",
          "value": "5706 AJ"
        },
        {
          "type": "NLD_LOCALITY",
          "value": "Helmond"
        },
        {
          "type": "NLD_MUNICIPALITY",
          "value": "Helmond"
        },
        {
          "type": "NLD_PROVINCE",
          "value": "Noord-Brabant"
        },
        {
          "type": "NLD_COUNTRY",
          "value": "Nederland"
        }
      ],
      "country": "NLD",
      "lines": [
        "Hoofdstraat 7",
        "5706 AJ Helmond",
        "Nederland"
      ],
      "location": {
        "latitude": 51.460438,
        "longitude": 5.631037
      }
    },
    {
      "components": [
        {
          "type": "NLD_PUBLIC_SPACE",
          "value": "Hoofdstraat"
        },
        {
          "type": "NLD_HOUSE_NUMBER",
          "value": 1
        },
        {
          "type": "NLD_POSTAL_CODE",
          "value": "6372 CN"
        },
        {
          "type": "NLD_LOCALITY",
          "value": "Landgraaf"
        },
        {
          "type": "NLD_MUNICIPALITY",
          "value": "Landgraaf"
        },
        {
          "type": "NLD_PROVINCE",
          "value": "Limburg"
        },
        {
          "type": "NLD_COUNTRY",
          "value": "Nederland"
        }
      ],
      "country": "NLD",
      "lines": [
        "Hoofdstraat 1",
        "6372 CN Landgraaf",
        "Nederland"
      ],
      "location": {
        "latitude": 50.895412,
        "longitude": 6.015682
      }
    },
    {
      "components": [
        {
          "type": "NLD_PUBLIC_SPACE",
          "value": "Hoofdstraat"
        },
        {
          "type": "NLD_HOUSE_NUMBER",
          "value": 1
        },
        {
          "type": "NLD_POSTAL_CODE",
          "value": "7811 EA"
        },
        {
          "type": "NLD_LOCALITY",
          "value": "Emmen"
        },
        {
          "type": "NLD_MUNICIPALITY",
          "value": "Emmen"
        },
        {
          "type": "NLD_PROVINCE",
          "value": "Drenthe"
        },
        {
          "type": "NLD_COUNTRY",
          "value": "Nederland"
        }
      ],
      "country": "NLD",
      "lines": [
        "Hoofdstraat 1",
        "7811 EA Emmen",
        "Nederland"
      ],
      "location": {
        "latitude": 52.783572,
        "longitude": 6.89627
      }
    },
    {
      "components": [
        {
          "type": "NLD_PUBLIC_SPACE",
          "value": "Hoofdstraat"
        },
        {
          "type": "NLD_HOUSE_NUMBER",
          "value": 1
        },
        {
          "type": "NLD_POSTAL_CODE",
          "value": "7902 EA"
        },
        {
          "type": "NLD_LOCALITY",
          "value": "Hoogeveen"
        },
        {
          "type": "NLD_MUNICIPALITY",
          "value": "Hoogeveen"
        },
        {
          "type": "NLD_PROVINCE",
          "value": "Drenthe"
        },
        {
          "type": "NLD_COUNTRY",
          "value": "Nederland"
        }
      ],
      "country": "NLD",
      "lines": [
        "Hoofdstraat 1",
        "7902 EA Hoogeveen",
        "Nederland"
      ],
      "location": {
        "latitude": 52.728929,
        "longitude": 6.477778
      }
    }
  ],
  "limit": 5
}
Each result represents a real address that can be shown to the user and selected.

What to do next