fbad_get_search: FB Search API Querying

View source: R/fb_search.R

fbad_get_searchR Documentation

FB Search API Querying

Description

FB Search API Querying

Usage

fbad_get_search(
  fbacc,
  q,
  type = c("adeducationschool", "adeducationmajor", "adgeolocation", "adcountry",
    "adzipcode", "adgeolocationmeta", "adradiussuggestion", "adinterest",
    "adinterestsuggestion", "adinterestvalid", "adlocale", "adTargetingCategory",
    "adworkemployer", "targetingsearch"),
  ...
)

Arguments

fbacc

(optional) FB_Ad_account object, which defaults to the last returned object of fbad_init.

q

string that is being searched for

type

describes the type of search eg: adinterest, adeducationmajor etc

...

other optional parameters accepted by the endpoint as key = value pairs eg: limit = 5000.

Value

data.frame containing results

References

https://developers.facebook.com/docs/marketing-api/audiences/reference/targeting-search

Examples

## Not run: 
fbad_get_search(q = 'r programming language', type = 'adinterest')
fbad_get_search(q = c('dog', 'cat'), type = 'adinterestvalid')

## End(Not run)

fbRads documentation built on Aug. 21, 2023, 1:06 a.m.