---
title: "List all sites"
type: reference
method: GET
path: /rest-api/sites.do
tag: "Sites"
---

# List all sites

`GET https://YOUR-NETWORK-DOMAIN/rest-api/sites.do`

Returns all non-deleted publisher sites belonging to the authenticated user's account. Requires ALL or SHARED level VIEW permission on INVENTORY. When using SHARED level, a share of any type must exist between the requester and each site. Results can be filtered by publishing category IDs, and by any on/off setting or relation flag (filter[...]); they are ordered by id, paged with offset and limit, and trimmed to the fields named in fields. Additional site details (URL, email, etc.) can be included via the basicInfo and basicInfoIds parameters.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `publishingCategories` | array<integer> | no | `10` | IDs of publishing categories to filter sites by |
| `basicInfo` | boolean | no | `true` | If true, includes additional site details such as URL, email, and contact info |
| `basicInfoIds` | array<string> | no | `5001,5002` | Comma-separated site IDs for which to include additional basic info |
| `offset` | integer | no | `0` | Pagination offset over sites ordered by id (zero-based) |
| `limit` | integer | no | `100` | Maximum number of sites to return; omit for all |
| `fields` | array<string> | no | `id,name,active` | Return only these fields of each entity, comma-separated; id is always kept. A requested field no returned row carries is named in the X-Ignored-Fields response header |
| `filter` | object | no | `{"hasLimits": "true"}` | Keep only entities matching every key, e.g. filter[cpaOptimization]=true&filter[hasLimit]=true. Keys are the entity's on/off settings (active, enableTargeting, cpaOptimization, alwaysRedirect, ...) and a has<Relation> flag for each setting kept in rows of its own (hasLimit, hasPricing, hasFrequencyCapping, hasTrackingCode, hasPriceAdjustmentRules, hasLabels, hasBanners, ...), true when the relation holds a row; hasCapping, hasLimits and hasTargetingRules group the relations of their kind. An unknown key is a 400 that lists every valid key for the list. |

## Responses

- `200` — Site list returned successfully
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Forbidden — insufficient permissions

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/sites.do?publishingCategories=10&basicInfo=true&basicInfoIds=5001%2C5002' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/sites/get-sites