> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalyr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta

> What an agent can build in your Meta ad account: objectives and goals, budgets and bidding, targeting, placements, ad formats with their limits, and what it can't do.

Agents create Meta campaigns, ad sets and ads in the ad account you selected for Meta in
**Sources**. Everything starts paused. This page lists every option an agent can set.

## Before you start

| Requirement | Detail |
| - | - |
| Meta connection | Connected in **Sources** after agent ads existed. An older connection lacks the permission to create ads: select **Reconnect**. |
| A Facebook Page | Every ad runs as a Page, with an optional Instagram account |
| A pixel | Only for ad sets that optimize for website conversions or value |
| EU audiences | If an ad set targets an EU country, set the beneficiary and payer once in Meta Ads Manager's ad account settings |

## Campaigns

| Objective | The ad set optimizes for (`goal.optimize_for`) | Also needs |
| - | - | - |
| `sales` | `conversions` or `value` | A pixel and event. Event default `PURCHASE`. |
| `traffic` | `landing_page_views` or `link_clicks` | |
| `leads` | `conversions` (website) or `instant_form` | Website: a pixel, event default `LEAD`. Instant form: a Page, and each ad names a form. |
| `awareness` | `reach` or `impressions` | |
| `engagement` | `post_engagement` or `video_views` | Post engagement: a Page. Its ads are existing posts. |
| `app_promotion` | `app_installs` | The app and its App Store or Google Play link |

Pixel events an ad set can optimize for: `PURCHASE`, `ADD_TO_CART`, `INITIATED_CHECKOUT`,
`ADD_PAYMENT_INFO`, `LEAD`, `COMPLETE_REGISTRATION`, `SUBSCRIBE`, `START_TRIAL`,
`CONTACT`, `CONTENT_VIEW`, `SEARCH`.

Every campaign is created with no special ad category. Housing, credit, employment and
political ads aren't available to agents.

## Budgets and bidding

Put the budget on the campaign (Advantage+ campaign budget, shared by its ad sets) or on
each ad set. Never both.

| Field | Values |
| - | - |
| `daily` | A daily budget in the ad account's currency. `50` means 50.00 per day. |
| `lifetime` | A total for the whole run. Needs `end_time`, at least one hour from now. |
| `bid_strategy` | `lowest_cost` (default), `cost_cap` or `bid_cap` with `amount`, or `roas_floor` with `roas_floor` |
| `roas_floor` | The lowest return to aim for. `2` means 200%. Needs the `sales` objective and a `value` goal. |
| `spend_cap` | Optional, campaigns only. A lifetime spending limit where Meta stops delivery. |

Under a campaign budget with a cost cap, bid cap or ROAS floor, each ad set brings its
own `bid.amount` or `bid.roas_floor`. Under a lifetime campaign budget, each ad set needs
an `end_time` unless the campaign has one. This applies to new ad sets in your existing
campaigns too: `list_ad_campaigns` shows which campaigns can take them.

## Ad sets: targeting and placements

| Field | Values |
| - | - |
| `locations` | `countries` (2-letter codes), `regions`, `cities` with an optional radius of 10 to 50 miles, `zips` like `US:78701`, and `places` (map pins with a radius of 1 to 80 km) |
| `exclude_locations` | The same shapes, for places to leave out |
| `age_min`, `age_max` | 18 to 65 |
| `genders` | `all` (default), `men` or `women` |
| `languages`, `interests`, `behaviors` | Ids from `search_targeting` |
| `custom_audiences`, `excluded_custom_audiences` | Custom and lookalike audience ids from `list_ad_audiences` |
| `advantage_audience` | On by default. Meta treats age as a suggestion, so it needs `age_min` 25 or lower and `age_max` 65. Set it to `false` for a strict range. |
| `placements` | `automatic` (default), or positions per network. See the accordion below. |
| `start_time`, `end_time` | Optional. `end_time` is required with a lifetime budget. |

`search_targeting` finds ids by type: `interest` (search a topic, such as `yoga`),
`behavior`, `location` (a country, region or city), `zip`, and `language`.

<Accordion title="Placement positions">
  | Network | Positions |
  | - | - |
  | `facebook` | `feed`, `right_hand_column`, `marketplace`, `video_feeds`, `story`, `search`, `instream_video`, `facebook_reels`, `facebook_reels_overlay`, `profile_feed`, `notification` |
  | `instagram` | `stream`, `story`, `explore`, `explore_home`, `reels`, `profile_feed`, `ig_search`, `profile_reels` |
  | `messenger` | `messenger_home`, `sponsored_messages`, `story` |
  | `audience_network` | `classic`, `rewarded_video` |
</Accordion>

## Ads

An agent adds up to 50 ads per call to one ad set. Meta allows 50 ads per ad set.

| Format | Files | Text |
| - | - | - |
| `single_image` | One image: 1:1 (at least 600×600), 4:5 (600×750), 1.91:1 (600×314) or 9:16 (500×889) | 1 primary text, 1 headline, 1 description |
| `single_video` | One video: 1:1, 4:5, 9:16 or 16:9. An optional thumbnail image. | 1 primary text, 1 headline, 1 description |
| `carousel` | 2 to 10 cards, each a 1:1 image (at least 600×600). Each card can have its own headline, description, link and call to action. | 1 primary text |
| `multi_asset` | One feed file, 1:1 or 4:5, plus an optional 9:16 file for Stories and Reels. Images or videos. | Up to 5 primary texts, 5 headlines and 5 descriptions. Meta rotates them. |
| `existing_post` | None: an existing Facebook or Instagram post | The post's own |

| Text | Limit | Shown before Meta cuts it |
| - | - | - |
| Primary text | 2,200 characters. 1,024 in `multi_asset`. | About 125 |
| Headline | 255 characters | About 40 |
| Description | 255 characters | About 30 |

| Ad rule | Detail |
| - | - |
| Identity | A Page from `list_ad_identities`, with an optional Instagram account. When the agent doesn't pick one, DATALYR uses what the ad set's ads run as, then the last one used on this ad account, then the only Page. |
| Call to action | Required, except on existing posts. For example `SHOP_NOW`, `LEARN_MORE`, `SIGN_UP`, or any Meta value as `meta:VALUE`. |
| Link | Required, except on existing posts. Up to 1,000 characters. |
| Instant forms | In an `instant_form` ad set, each ad names its form: `platform_options.lead_form_id` from `list_ad_lead_forms`. |
| Dynamic creative ad sets | Take one ad. `multi_asset` needs an ad set that isn't dynamic creative. |

## What agents can't do on Meta

| Not available | What happens |
| - | - |
| Special ad categories: housing, credit, employment, politics | Campaigns in these categories show `can_add_ads: false` |
| Catalog ads | Catalog ad sets show `can_add_ads: false` |
| Ad sets that send people to a chat: Messenger, WhatsApp, Instagram Direct | Shown with `can_add_ads: false` |
| Campaigns with an objective outside the six above | Refused as an unsupported objective |
| A second ad in a dynamic creative ad set | Refused |

## Changes after launch

Meta has every change: turn on, pause, daily and lifetime budgets, new content for an ad,
archive and delete. See [Change ads after launch](/agent-ads/change-ads).

## Previews

A ready preview includes Meta's preview links and DATALYR's page with every placement. See
[See every placement](/agent-ads/how-publishing-works#see-every-placement-meta).

## Next

* [Create your first agent ad](/agent-ads/get-started): a first paused Meta ad.
* [Add ad files](/agent-ads/files): get images and videos to the agent.
* [Meta Ads](/integrations/meta-ads): connect Meta and send conversions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.