---
title: "Search campaigns"
type: reference
method: POST
path: /rest-api/search/campaigns.do
tag: "Search"
---

# Search campaigns

`POST https://YOUR-NETWORK-DOMAIN/rest-api/search/campaigns.do`

Performs an advanced search over campaigns using filter parameters submitted as a JSON request body. Supports pagination (limit/page), sorting (sortBy/sortDir), active status filtering, name filtering, filtering by campaign ids (ids), and targeting parameter filters. The response optionally includes targeting, pricing, and limits data for each campaign depending on 'showTargeting', 'showPricing', and 'showLimits' flags (subject to the caller's permissions for MANAGE_DEMAND_TARGETING, MANAGE_CAPPING_AND_LIMITATIONS, and MANAGE_PRICING respectively). Users with CAMPAIGNS SHARE permission see all campaigns; otherwise only campaigns shared with the authenticated user are returned. Response is a JSON object with 'data' array and 'total' count.

## Body

A JSON body. An example, built from the field definitions:

```json
{
  "limit": "25",
  "page": "0",
  "sortBy": "1",
  "sortDir": "desc"
}
```

## Responses

- `200` — JSON object with 'data' array of campaign objects (each containing baseEntity, target, limit, pricing) and 'total' count
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error - invalid hash, timestamp, or username
- `403` — Forbidden — insufficient permissions

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/search/campaigns.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": "25",
  "page": "0",
  "sortBy": "1",
  "sortDir": "desc"
}'
```

Source: https://epom.com/ad-server/docs/api/search/post-search-campaigns