---
title: "Count of points of interest around a location"
description: "Returns POI counts within `search_area` metres of a coordinate. With `res_group=true` the counts are grouped into Aireon amenity clusters."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.aireon.ch/llms.txt
> Use this file to discover all available pages before exploring further.

Path: RES API (public) › Score

`GET /score/poi-num`

Returns POI counts within `search_area` metres of a coordinate. With `res_group=true` the counts are grouped into Aireon amenity clusters.

## Authentication

- `ResApiToken`, apiKey, in header, header `token`

## Query parameters

- `search_area` (`getPoiCounts.query.search_area`; integer, required): Search radius, in metres.
- `lat` (`getPoiCounts.query.lat`; number, required): WGS84 latitude.
- `lng` (`getPoiCounts.query.lng`; number, required): WGS84 longitude.
- `res_group` (`getPoiCounts.query.res_group`; string, optional): When `true`, group counts into amenity clusters.
  - one of `"true"`, `"false"`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://res.aireon.ch/score/poi-num?search_area=0&lat=0&lng=0' \
  --header 'token: <token>'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/score/poi-num?search_area=0&lat=0&lng=0';
const options = {method: 'GET', headers: {token: '<token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://res.aireon.ch/score/poi-num?search_area=0&lat=0&lng=0"

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

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

print(response.text)
```

## Responses

### 200

POI counts (raw ORS stats, or per-cluster counts when grouped).

#### Example

```json
{}
```

### 400

Invalid request.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getPoiCounts.response.400.error`; string, required): Human-readable error description.
- `message` (`getPoiCounts.response.400.message`; string, optional): Optional underlying error message.

### 401

Authentication token missing (plain-text body).

#### Example

```text
Missing Token
```

### 403

Authentication token invalid (plain-text body).

#### Example

```text
Wrong Token
```

### 500

Server error.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getPoiCounts.response.500.error`; string, required): Human-readable error description.
- `message` (`getPoiCounts.response.500.message`; string, optional): Optional underlying error message.


Source: https://docs.aireon.ch/res/get-poi-counts/index.md
