Example Tobacco Prevention Ads Research API queries

To help get you started, we have provided some API query examples below. Use the Run query button to call the API and get back results. You can experiment by editing the example queries in the black text box.

Example query

One Tobacco Digital Ads Research record

This query searches for all records and asks for a single one.

  1. Search for all records and display one.

  2. limit to 1 record.

Example query

Instagram stories video ad

This query searches for all records with a format of "Instagram stories video ad".

  1. search for all records with channel_or_format equal to "Instagram stories video ad".

Example query

Count Records by ad_number

The suffix .exact is required by openFDA to count the unique full phrases in the field product. Without it, the API will count each word in that field individually.

  1. count the records associated with each ad_number