Search API endpoints
Endpoint reference for the Search tag (2 endpoints): Autocomplete and suggestion search across inventory entities
Autocomplete and suggestion search across inventory entities. 2 endpoints, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.
POST /rest-api/search/campaigns.do
Search campaigns.
Request body (application/json, required): JSON object with fields active, ids, limit, name, page, showLimits, showPricing, showTargeting, sortBy, sortDir, tTypeClause, targetParams.
Responses: 200 — JSON object with ‘data’ array of campaign objects (each containing baseEntity, target, limit, pricing) and ‘total’ count. Errors follow the shared conventions.
GET /rest-api/suggest-items.do
Find entities by name or ID.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
query | query | string | yes | Search query string for matching entity names. Prefix with ’#’ to search by entity ID (e.g. ‘#123’). Required. |
myItems | query | boolean | no | When true, restricts results to only entities owned by the authenticated user. Defaults to false. |
entities | query | array<string> | no | Array of entity types to search in. Accepted values: SITE, ZONE, PLACEMENT, BANNER, CAMPAIGN, ADVERTISER. When omitted, searches all entity types the user has permission to access. Values: PLACEMENT_ID, ZONE_ID, SITE_ID, BANNER_ID, CAMPAIGN_ID, ADVERTISER_ID, PLACEMENT, ZONE, SITE, OPEN_RTB_PUBLISHER_ID, BANNER, CAMPAIGN, ADVERTISER, CHANNEL, ACTION, ACTION_ID, ATTRIBUTION_TYPE, COUNTRY, COUNTRY_GROUP, CARRIER, CONNECTION_TYPE, LANGUAGE, ACCEPT_LANGUAGE, TIME_ZONE_NAME, BROWSER_COUNTRY … (+43 more, 68 total). |
shareType | query | array<string> | no | Array of share type filters to restrict results by sharing relationship. When omitted and myItems is false, no share type filter is applied. Values: IS_OWNER, CAN_EDIT, CAN_VIEW. |
filterPath | query | string | no | Inventory path ID to scope the search within a specific branch of the entity hierarchy (e.g. an advertiser ID to find only its campaigns). When omitted, searches across the entire inventory. |
affiliateOnly | query | boolean | no | When true, restricts results to only affiliate-type entities. Defaults to false. |
includeActive | query | boolean | no | When true, every result also carries active — whether the entity is switched on. Defaults to false. |
Responses: 200 — JSON array of matches with id, name, type, categoryId, categoryName, inactive (true = no traffic in the last ~2 days, regardless of the on/off state), pending (always false), the parents’ ids, approvalStatus on banners and, with includeActive=true, active. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag
- Network services and miscellaneous APIs