facebookresearch / Ad-Library-API-Script-Repository

GitHub repository of commonly used python scripts that allows everyone to pull data via the Ad Library API
Other
213 stars 84 forks source link

Unsupported fields: 'page_id,ad_delivery_start_time' #7

Closed Annrison closed 2 years ago

Annrison commented 4 years ago

I follow the document and try the example in read.md

python fb_ads_library_api_cli.py -t {access_token} -f 'page_id,ad_snapshot_url,funding_entity,ad_delivery_start_time' -c 'CA' -s '.' -v count but an error occured and says

usage: fb_ads_library_api_cli.py [-h] -t ACCESS_TOKEN -f FIELDS [-s SEARCH_TERM] -c COUNTRY [--search-page-ids SEARCH_PAGE_IDS] [--ad-active-status AD_ACTIVE_STATUS] [--after-date AFTER_DATE] [--batch-size BATCH_SIZE] [--retry-limit RETRY_LIMIT] [-v] action ... fb_ads_library_api_cli.py: error: argument -f/--fields: Unsupported fields: 'page_id,ad_delivery_start_time'

Is there a way to fix this?

Thanks

skylarcheung commented 3 years ago

Hi @Annrison you will have to use the CLI as intended, which entails including search terms and other values in the place of the placeholders within each bracket. You can search 'command line interface' for more details on how to use CLIs. Generally, you should be running something like

python fb_ads_library_api_cli.py -t “insertAccessTokenHere” -f “ad_snapshot_url,funding_entity,ad_delivery_start_time” -c “US” --search-page-ids “insertPageIdHere” --ad-active-status “active”