How to use targeting in Campaign Planner

The Campaign Planner API enables customers to generate pre-campaign inventory forecasts programmatically. Customers can submit targeting, date range, placement type, and optional inventory constraints to estimate available supply and improve planning confidence.

Non targeting Keys

  • start_time
  • end_time
  • non_targeting_keys
    • field: line_item_type

Targeting Modules and Keys

  • Targeting modules – group related targeting fields.

Examples

  • geo (e.g., country, region, metro, ZIP lists)
  • app_site (e.g., deal_id, publisher_id, domain / domain lists)
  • environment (e.g., environment_type, ads_txt status)
  • exchange (e.g., inventory_source, auction_type)
  • platform (e.g., browser, bandwidth)
  • time (e.g., user_time_of_week / dayparting)
  • user (e.g., segment and segment recency)
  • Targeting keys – individual fields within a module (for example, within geo: country, region, metro, zip_code_lists, etc.).

Targeting Expressions in Campaign Planner

  • Each expression is organized by module and key, and uses predicates to define the behavior.

Predicates

  • all – all targeting in this set must be true (logical AND).
  • any – any targeting in this set may be true (logical OR).
  • none – all targeting in this set must NOT be true (logical NOT / exclusion).

At the module level, these predicates control how keys in a module are combined. For example:

  • all at the module level = AND across keys in that module.
  • any at the module level = OR across keys in that module.
  • none at the module level = exclusion logic for that module.

Within each targeting key, Campaign Planner uses comparators and values:

Comparators

  • equals – value must match exactly.
  • in_range – value must fall within a numeric range (e.g., time-of-week buckets).
  • boolean_expression – used only with segment targeting to evaluate a free-form boolean expression.

Examples Request in Planner:

{ "user": { "any": {}, "all": { "segment": { "any": [ { "value": "alliant-167434", "comparator": "equals" } ], "all": [] } }, "none": { "segment": { "any": [ { "value": "alliant-168055", "comparator": "equals" } ], "all": [] } } }, "time": { "any": {}, "all": { "user_time_of_week": { "any": [ { "value": [ 1920, 2459 ], "comparator": "in_range" }, { "value": [ 3360, 3899 ], "comparator": "in_range" }, { "value": [ 4800, 5339 ], "comparator": "in_range" }, { "value": [ 6240, 6779 ], "comparator": "in_range" }, { "value": [ 7680, 8219 ], "comparator": "in_range" } ], "all": [] } }, "none": {} }, "platform": { "any": {}, "all": { "device_make": { "any": [ { "value": "1.me", "comparator": "equals" } ], "all": [] } }, "none": {} }, "geo": { "any": {}, "all": { "country": { "any": [ { "value": "ABW", "comparator": "equals" } ], "all": [] } }, "none": {} }, "environment": { "any": {}, "all": { "environment_type": { "any": [ { "value": 0, "comparator": "equals" } ], "all": [] } }, "none": {} }, "app_site": { "any": {}, "all": { "app_name": { "any": [ { "value": "LG Channels", "comparator": "equals" } ], "all": [] } }, "none": {} } }