Marketing API Version

TargetingSearch

TargetingSearch.search (params, api)

Returns an iterator that lists matching data that targeting search retrieves

Name Type Description Required

params

map

A mapping of request parameters where a key is the parameter name and its value is a string or an object which can be JSON-encoded.

No

api

FacebookAdsApi

A FacebookAdsApi instance.

No

Sample Code

results = TargetingSearch.search(params={
    'q': 'United States',
    'type': TargetingSearch.TargetingSearchTypes.country,
    'limit': 2,
})
print results