# geocode2location: Geocode to Location

> geocode2location (Geocode to Location) is a 1001fx API function in the group Geo: POST https://api.1001fx.com/geo/geocode2location, 1 credit per call. It works as a ready-made module in Make and n8n or as a plain HTTP call.

Looks up a provided longitude and latitude values and returns location informations.

- This service is provided by an external service provider: OpenStreetMap. The data of the call is sent to the provider. [More about service providers](https://1001fx.com/functions#serviceproviders)

- Group: Geo
- Endpoint: `POST https://api.1001fx.com/geo/geocode2location`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 1 credit per call
- Ready-made in: Make and n8n
- Service provider: OpenStreetMap
- Docs: https://1001fx.com/functions/geocode2location

## Parameters

- `latitude` (number, required, min -90, max 90) – Latitude: Latitude value to look up.
- `longitude` (number, required, min -180, max 180) – Longitude: Longitude value to look up.

## Example: Geocode to Location

```bash
curl -X POST 'https://api.1001fx.com/geo/geocode2location' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"latitude":50.1104684,"longitude":8.6816587}'
```

Answer (HTTP 200):

```json
{
  "result": [
    {
      "latitude": 50.1104684,
      "longitude": 8.6816587,
      "formattedAddress": "Römer, 21, Römerberg, Altstadt, Innenstadt 1, Frankfurt am Main, Hessen, 60311, Deutschland",
      "country": "Deutschland",
      "city": "Frankfurt am Main",
      "state": "Hessen",
      "zipcode": "60311",
      "streetNumber": "21",
      "countryCode": "DE"
    }
  ]
}
```
