GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelogLog In

Search for Ad Sets

Retrieving Ad Sets by Filtering

Ad Sets can be retrieved by specifying filters to apply to the set of all Ad Sets in your portfolio.

Current available filters are adSetIds (which allows you to specify a list of Ad Set IDs to retrieve), campaignIds (which allows you retrieve Ad Sets belonging to a list of Campaigns) and advertiserIds (which allows you retrieve Ad Sets belonging to a list of Advertisers).

 

For example, to retrieve two existing Ad Sets in your portfolio, filter by adSetIds:

https://api.criteo.com/2021-01/marketing-solutions/ad-sets/search
{
    "filters": {
        "adSetIds": ["12345", "67890"] 
    }
}

The API will return an array of Ad Sets that match the provided filters:

{
    "data": [
        {
            "type": "ReadAdSet",
            "id": "12345",
            "attributes": { ... }
        },
            "type": "ReadAdSet",
            "id": "67890",
            "attributes": { ... }
        }
    ],
    "errors": []
}

The response above is truncated for clarity. A full accounting of the attributes of each Ad Set can be found on the Anatomy of an Ad Set page.

Note: the type field is the type of entity e.g. ReadAdSet and the id field is the unique id of the Adset

 

Retrieving All Ad Sets

When no filters are specified in the JSON payload, all Ad Sets in your portfolio will be returned, as in the example below:

https://api.criteo.com/2021-01/marketing-solutions/ad-sets/search
{
    "filters": {}
}

 

Retrieving One Specific Ad Set

You can also fetch the details for a single Ad Set using a GET request:

https://api.criteo.com/2021-01/marketing-solutions/ad-sets/{adSetId}

 

The response data will be a single object containing the Ad Set details.

{
    "data": {
        "type": "ReadAdSet",
        "id": "12345",
        "attributes": { ... }
    },
    "errors": []
}

 


What’s Next

Learn how to update an Ad Set's fields