---
title: Selector
framework: Apple Ads
role: symbol
role_heading: Object
platforms: [search ads 2.0+]
path: apple_ads/selector
---

# Selector

The selector objects available to filter returned data.

## Declaration

```data
object Selector
```

## Properties

conditions: A list of condition objects that allow users to filter a list of records. fields: A list of field names to return within each record. orderBy: A list of field names and grouping to sort the records by ASCENDING or DESCENDING. pagination: A defined range and limit of the number of returned records.

## Discussion

Discussion Selector objects define what data the API returns when fetching resources. You use Selector objects with find calls and reporting endpoints.  |   |   |   |  The following is an example of using selectors to filter returned records: POST https://api.searchads.apple.com/api/v5/campaigns/find

{     "fields": [     "id",     "name",     "adamId",     "dailyBudgetAmount",     "status",     "servingStatus"   ],   "conditions": [     {       "field": "servingStatus",       "operator": "IN",       "values": [         "NOT_RUNNING"       ]     }   ],   "orderBy": [     {       "field": "id",       "sortOrder": "DESCENDING"     }   ],   "pagination": {     "offset": 0,     "limit": 10   } }

You can also use Selector objects to find archived or soft-deleted campaigns. By default, API fetch calls don’t return deleted resources, with the exception of GET by a resource Id. To retrieve deleted resources, you must explicitly request the call using the selector Condition. The following example returns both deleted and undeleted resources: {   "fields": null,   "conditions": [     {       "field": "deleted",       "operator": "IN",       "values": [         true,         false       ]     }   ],   "orderBy": [     {       "field": "name",       "sortOrder": "ASCENDING"     }   ],   "pagination": {     "offset": 0,     "limit": 100   } }

## See Also

### API Usability

- [Condition](apple_ads/condition.md)
- [PageDetail](apple_ads/pagedetail.md)
- [Pagination](apple_ads/pagination.md)
- [Sorting](apple_ads/sorting.md)
