Guides
Campaigns

Targeting

The ad set's targeting object: locations, radius, age, gender, Advantage+ audience and placements, with what Mimicr validates and what it only stores.

An ad set's audience goes in targeting, a JSON object sent on creation (POST /act_{id}/adsets) or on edit (POST /{adset_id}). Mimicr stores the object as you sent it, with defaults filled in, and returns it in GET /{adset_id}?fields=targeting.

json
{
  "geo_locations": {
    "custom_locations": [{ "latitude": -23.55, "longitude": -46.63, "radius": 5, "distance_unit": "kilometer" }]
  },
  "age_min": 18,
  "targeting_automation": { "advantage_audience": 0 }
}

Locations

geo_locations is required. Without it, 100/1487079 "Your audience is missing a location".

FieldFormatRule
countries["BR"]ISO-2 codes
regions[{"key":"460"}]Region keys
cities[{"key":"269969","radius":20,"distance_unit":"kilometer"}]Radius from 17 to 80 km (10 to 50 mi)
custom_locations[{"latitude":…,"longitude":…,"radius":5,"distance_unit":"kilometer"}] or [{"address_string":"…","radius":5}]Radius from 1 to 80 km (0.63 to 50 mi), up to 200 points
location_types["home","recent"]Stored

distance_unit defaults to mile, as on Meta: send kilometer when the radius is in km. A radius out of range answers 100/1487753.

Age and gender

  • age_min: 13 or more; default 18.
  • age_max: up to 65; default 65.
  • genders: [1] men, [2] women; omit for all.

Advantage+ audience

targeting_automation.advantage_audience says whether Meta may expand the audience beyond what you defined.

  • 1 (on): age_min can only be between 18 and 25, and age_max can't be set (it stays 65). Otherwise, 100/1870189.
  • 0 (off): the audience is exactly what you defined.
  • Without the field on creation, the default is 1. But if the audience is restricted (interests, detailed targeting, minimum age above 18 or maximum below 65), or if the campaign has the housing, employment, credit or financial services special category, the field is required: 100/1870227 "Advantage audience flag required".
json
{
  "error": {
    "message": "(#100) Advantage audience flag required: set targeting_automation.advantage_audience to 0 or 1.",
    "type": "OAuthException",
    "code": 100,
    "error_subcode": 1870227,
    "is_transient": false,
    "error_user_title": "Advantage audience flag required",
    "error_user_msg": "Informe targeting_automation.advantage_audience: 0 (desligado) ou 1 (ligado).",
    "error_data": { "blame_field_specs": [["targeting", "targeting_automation"]] }
  }
}

On v27.0, ad sets of OUTCOME_SALES campaigns get targeting_automation.individual_setting.device: 1 if you don't send it.

For a fixed radius audience, such as local deliveries, send advantage_audience: 0 explicitly. That avoids surprises from the default.

Placements

publisher_platforms (facebook, instagram, messenger, audience_network), facebook_positions, instagram_positions, messenger_positions and device_platforms are stored as sent. Since v26.0, story is removed from messenger_positions without an error.

What is stored but not resolved

flexible_spec, exclusions and interests are stored and returned, but Mimicr doesn't resolve interests or compute reach. Custom audiences (custom_audiences) are outside the core: an ad set that uses them answers 501 with MimicrNotSimulated, as do /act_{id}/reachestimate, /act_{id}/delivery_estimate and targeting search.

Editing the audience

Send the full targeting in POST /{adset_id}; it replaces the previous one. Editing the audience doesn't count toward the budget change limit, but if the same POST carries daily_budget, it does (see Edit, pause and budget).

Reference: Create ad set and Update ad set.