Meta Ads API

Meta's Marketing API requires creating a Meta App, submitting permissions for App Review, and ongoing compliance. Direct integration risks account bans from the 'external AI agent' detection pattern. Zernio is an approved Meta Marketing Partner - we wrap Facebook and Instagram ads behind one REST API.

  • Free tier
  • No credit card
  • 99.97% uptime
northsupplySponsored

Our spring plant drop is here.

Spring plants, deliveredFree delivery on orders over $40.
Shop now
Meta AdsLast 7 days$413

Join 200,000+ of the world's most ambitious developers and builders

Warner Music Group
Runable
ClickUp
MoFlo
RE/MAX
Readdy
How it works

Live in three steps, no Meta Ads developer approval

1

Meta Ads

Connect your business

Connect with Facebook

Connect Meta Ads

Sign up for free, get your API key and connect Meta Ads ad accounts through our OAuth flow.

2

POST /v1/ads/create

const { data } = await zernio.adcampaigns.createStandaloneAd({
  body: {
    accountId: 'acc_8f2a',
    adAccountId: 'act_1234567890',
    name: 'Spring launch',
    goal: 'traffic',
    budgetAmount: 25,
    budgetType: 'daily',
    headline: 'Ship faster with Acme',
    body: 'The platform for product teams.',
    imageUrl: 'https://cdn.acme.com/launch.jpg',
    linkUrl: 'https://acme.com',
    callToAction: 'LEARN_MORE',
    countries: ['US', 'CA'],
    ageMin: 25,
    ageMax: 45,
  },
});

Launch a campaign

Create the campaign, its budget, targeting and creative in one API call.

3

Retargeting

$30/day

Paused

Summer Sale

$40/day

$0.94 CPC

Launch Push

$18/day

$412

Track the results

Spend and results sync back. Pause ads, change budgets and pull reports from the same API.

Endpoints

Meta Ads endpoints on one REST API

EndpointWhat it does
POST/v1/ads/createCreate a Facebook or Instagram campaign with ad set and creative
POST/v1/ads/boostPromote an existing Facebook or Instagram post as an ad
POST/v1/ads/audiencesCreate a Custom Audience (customer list, website, lookalike)
POST/v1/ads/audiences/{id}/usersAdd users to a Custom Audience (SHA-256 hashed automatically)
GET/v1/ads/{id}Get ad details, spend, and current status
PUT/v1/ads/{id}Update status, budget, schedule, or targeting
GET/v1/ads/{id}/analyticsSpend, impressions, clicks, CTR, CPC, CPM, ROAS with breakdowns
GET/v1/ads/campaignsList campaigns across connected Meta ad accounts
Media specs

What you can upload to Meta Ads

Zernio transcodes and optimizes media for Meta Ads's requirements automatically.

meta-ads/media-specs
TypeFormatMax sizeNotes
Feed ImageJPEG, PNG30 MBRecommended 1080x1080 (1:1) or 1200x628 (1.91:1)
Reels VideoMP4, MOV4 GBVertical 9:16, max 90 sec
Story Image/VideoJPEG, PNG, MP430 MB image / 4 GB video9:16 vertical
CarouselJPEG, PNG, MP430 MB / card2-10 cards
HeadlineText40 charsPrimary headline
Capabilities

Everything the API handles for you

Meta Marketing API uses a per-app and per-ad-account rate limit budget. Zernio pools across customers and handles 17/32/80 throttle errors with automatic backoff.

Instagram placements

Feed, Stories, Reels, and Explore on Instagram.

Full hierarchy

Campaign → Ad Set → Ad, managed through one API.

Facebook placements

Feed, Stories, Reels, and Marketplace on Facebook.

Live metrics

Real-time spend, CPM, CPC, and ROAS with breakdowns.

Custom Audiences

Customer list, website, and lookalike audiences.

Detailed targeting

Target by interests, behaviors, and demographics.

Boosted posts

Boost existing organic posts on Facebook and Instagram.

Start building with the Meta Ads API

Free tier available. No credit card required.

  • Free tier
  • No credit card
  • 99.97% uptime