> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ocpplab.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ocpplab.io/_mcp/server.

# Search locations

GET https://api.ocpplab.io/emsp/locations

Your own OCPP chargers and roaming CPOs' locations, filtered by area, text, CPO, connector, power, facilities and parking type, optionally scoped to a network or a token group's networks. Each row carries a stable ``uid`` and its ``source`` (``OWN_OCPP`` or ``PARTNER_OCPI``).

Reference: https://docs.ocpplab.io/api-reference/emsp/locations/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `cpo_ids` (list of string, optional) — Only these CPOs, as ``CC*PID``. Repeat for more than one.
- `countries` (list of string, optional) — ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
- `connector_types` (list of string, optional) — Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
- `facilities` (list of string, optional) — OCPI facilities, e.g. ``CAFE``. A location must list every one. Repeat for more than one.
- `parking_types` (list of string, optional) — OCPI parking types, e.g. ``PARKING_GARAGE``. Any one matches. Repeat for more than one.
- `network_id` (integer, optional, nullable) — Only locations this network reaches. Not together with token_group_id.
- `token_group_id` (integer, optional, nullable) — Only locations the group's networks reach. Not together with network_id.
- `bounding_box` (string, optional, nullable) — Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
- `after` (string, optional, nullable) — Cursor: the previous page's ``pagination.end_cursor`` (``country_code:party_id:location_id``). Omit it for the first page.
- `limit` (integer, optional, default: 50) — Maximum rows per page (default 50, max 200).
- `q` (string, optional, nullable) — Text in name, address or city.
- `lat` (double, optional, nullable) — Search centre latitude (WGS84); send with lon.
- `lon` (double, optional, nullable) — Search centre longitude (WGS84); send with lat.
- `radius_km` (double, optional, nullable) — Search radius around lat/lon in km (default 10).
- `availability` (boolean, optional, default: false) — Only locations with an EVSE free right now.
- `min_power` (double, optional, nullable) — Minimum connector power in kW.
- `own` (boolean, optional, nullable) — true: only your own OCPP chargers. false: only partner (roaming) locations.

## Response

### 200

One page of own and partner locations.

- `data` (list of EmspGatewaySchemaLocationsLocationOut, required)
- `pagination` (EmspPageInfo, required) — Spirii cursor page. Pass end_cursor as the next after value.

## Errors

### 400 Bad Request Error

network_id and token_group_id were both sent

- `detail` (string, required) — Human-readable error message returned by the API.

### 401 Unauthorized Error

Missing or invalid Bearer token

- `detail` (string, required) — Human-readable error message returned by the API.

### 422 Unprocessable Entity Error

The request does not match the schema

- `detail` (list of ValidationError, optional) — One entry per invalid field.

### 429 Too Many Requests Error

Gateway rate limit reached; retry after the given seconds

- `detail` (string, required) — Human-readable error message returned by the API.

### 502 Bad Gateway Error

Gateway unreachable, failing, or misconfigured

- `detail` (string, required) — Human-readable error message returned by the API.

### 504 Gateway Timeout Error

Gateway timed out

- `detail` (string, required) — Human-readable error message returned by the API.

## Types

### EmspGatewaySchemaLocationsLocationOut

One own or partner location. Latitude and longitude are null when geo is null.

- `uid` (string, required)
- `source` (string, required)
- `organization_id` (string, required)
- `country_code` (string, required)
- `party_id` (string, required)
- `location_id` (string, required)
- `cpo_id` (string, required)
- `last_updated` (datetime, required)
- `name` (string, optional, nullable)
- `address` (string, optional, nullable)
- `city` (string, optional, nullable)
- `postal_code` (string, optional, nullable)
- `country` (string, optional, nullable)
- `time_zone` (string, optional, nullable)
- `parking_type` (string, optional, nullable)
- `publish` (boolean, optional, nullable)
- `latitude` (string, optional, nullable)
- `longitude` (string, optional, nullable)
- `facilities` (list of string, optional, nullable)

### EmspPageInfo

Spirii cursor page. Pass end_cursor as the next after value.

- `has_next` (boolean, required)
- `end_cursor` (string, optional, nullable)

### ValidationError

Why one field is invalid.

- `loc` (list of ValidationErrorLocItems, required) — Where the field is: ``body`` / ``query`` / ``path`` / ``header``, then its name.
- `msg` (string, required) — What is wrong, in English.
- `type` (string, required) — Machine-readable error code, e.g. ``missing``.
- `input` (any, optional) — The value that was sent.
- `ctx` (ValidationErrorCtx, optional) — Details of the rule that failed, e.g. `{"le": 200}`.

### ValidationErrorLocItems

### ValidationErrorCtx

Details of the rule that failed, e.g. `{"le": 200}`.

## Examples

**Response**

```json
{
  "data": [
    {
      "uid": "3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f0b7c34",
      "source": "PARTNER_OCPI",
      "organization_id": "550e8400-e29b-41d4-a716-446655440000",
      "country_code": "NL",
      "party_id": "ABC",
      "location_id": "LOC-AMS-001",
      "cpo_id": "NL*ABC",
      "last_updated": "2026-09-30T10:00:00Z",
      "name": "Amsterdam Zuid",
      "address": "Strawinskylaan 1",
      "city": "Amsterdam",
      "postal_code": "1077 XW",
      "country": "NLD",
      "time_zone": "Europe/Amsterdam",
      "parking_type": "PARKING_GARAGE",
      "publish": true,
      "latitude": "52.338000",
      "longitude": "4.872000",
      "facilities": [
        "CAFE"
      ]
    }
  ],
  "pagination": {
    "has_next": false,
    "end_cursor": "NL:ABC:LOC-AMS-001"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.ocpplab.io/emsp/locations"

querystring = {"limit":"50","lat":"52.37","lon":"4.89","radius_km":"5","availability":"true","min_power":"50"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ocpplab.io/emsp/locations?limit=50&lat=52.37&lon=4.89&radius_km=5&availability=true&min_power=50")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```