Head to head · Ad reporting · October 2026 research run

Meta Marketing API vs X Ads API

Meta Marketing API scores 68.4 (B) on agent readiness against X Ads API's 58.7 (C), and leads in 5 of 7 scored categories. Both do ad reporting.

Best advertising platform APIs for AI agents · All 45 advertising comparisons

Which one, for what

Meta Marketing API B

Best for The direct route to Facebook, Instagram, Messenger, WhatsApp and Threads advertising for reporting, campaign and budget changes, audiences and creatives.

Ahead on

  • Schema & documentation, 76 against 64
  • Agent ergonomics, 77 against 62
  • Security & auth, 61 against 48
  • Payments & pricing, 45 against 30
  • Maintenance & community, 77 against 63

Watch for

Default Limited access allows a score of 60 per ad account (read 1, write 3) and blocks for 300 seconds at the limit

X Ads API C

Best for An agent that manages or reports on X campaigns for an advertiser with an approved developer app, especially through the MCP server, where scopes separate reads from writes and writes start paused.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

No OpenAPI file covers the Ads API. The published file (version 2.170, 178 paths) describes api.x.com only

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Agent ergonomics Meta Marketing API +15

Meta Marketing API 77

Responses can be sized with fields, limit, Insights level and summaries. The Ads MCP server is not what we graded, and its 91 documented tools would score lower here (20). Cursor paging, filtering, date presets, breakdowns, asynchronous report runs, batch requests and ETags (20). Errors carry code, error_subcode, error_user_title, error_user_msg and fbtrace_id, and the error reference maps codes to causes (17). No idempotency key was found in the reviewed documentation. execution_options=validate_only tests a write without performing it, and objects can be created paused (8). Business SDKs in five languages, but npm's Node.js package is two versions behind, every path needs a version, and campaign creation needs special_ad_categories as well as name, objective and status (12).

X Ads API 62

Lists take count from 1 to 1,000 and filters by ID. No field selection on entity reads was found, and the campaign management reference is about 274 KB of Markdown. The MCP server lists 74 tools, which can be narrowed by scope (14 of 25). Cursor paging, sort_by, name search with q, with_deleted, with_draft, asynchronous analytics jobs and an Active Entities endpoint that says which entities changed (18 of 20). Errors carry a constant code, a message and often the parameter and details (15 of 20). No idempotency key was found. Batch endpoints take up to 40 items and succeed or fail as a group, PUT changes only the fields sent, and the sandbox host never serves ads. MCP tool annotations were not read (8 of 20). REST calls need an OAuth 1.0a signature on each request. The official Python and Ruby SDKs are at v11.0.0 from May 2022, one API version behind (7 of 15). Total 62.

Payments & pricing Meta Marketing API +15

Meta Marketing API 45

No x402, MPP or L402 (0). No charge for API calls was found and no price list exists for the API. Tiers differ by rate limit and ad spend is billed to the ad account, so we scored the middle value (10). Limited access is automatic with no card, and a sandbox ad account needs no funding source (20). A person has to create a Meta account and a developer app in a browser, and App Review applies to managing other businesses' accounts (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 30 is 45.

X Ads API 30

No x402, MPP or L402 (0). No page read states a fee for Ads API access, and the X API pricing page does not mention the Ads API. Advertising prices were not read (10). The sandbox creates test accounts and funding instruments at no stated cost. Whether a developer account or an Ads app needs a payment card was not established (10). A person has to create a developer app, request Ads API access and consent in a browser (0). Total 20. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 20 is 30.

Maintenance & community Meta Marketing API +14

Meta Marketing API 77

The 2026 out-of-cycle log has a dated API change on 22 October 2026 (is_pca_unified on campaign groups), and the Python and Node.js SDKs were tagged 26.0.2 on 20 September (30). Since 3 August, out-of-cycle entries on 13 August, 6 October, 19 October and 22 October, and SDK tags 26.0.0, 26.0.1 and 26.0.2 (20). Closed service with a dated changelog, a support page and a developer community group. The Marketing API changelog and versioning pages now name v26.0 as current and the out-of-cycle log runs to 22 October, while the two changelog pages give different end dates for v24.0, and the 8 October reading of the Python SDK issues (30 newest open issues spam with no replies) couldn't be re-read (10). Official SDKs in five languages, with Python and Node.js tagged 26.0.2 in their repositories, while npm's latest is still 24.0.1 from 21 November 2025 (10). CI and publish workflows in the SDK repositories, with generated code and a changelog that stops at v25.0.3 (7).

X Ads API 63

The latest changelog entry labelled X Ads API is dated 29 October 2026 (Conversion API for App Events), 6 days before the check (30). Five Ads API entries fall in the 90 days to 4 November 2026, on 13 August, 15, 16 and 17 September and 29 October (20). Closed service with a dated changelog and RSS feed. The developer forum's robots.txt closes it to us, so replies there were not read (8 of 15). The two official SDKs, for Python and Ruby, were last tagged v11.0.0 on 27 May 2022 and target API version 11, with no commit since, per clones on 4 November (3 of 15). Both SDK repositories have CI workflows (2 of 10). Total 63.

Security & auth Meta Marketing API +13

Meta Marketing API 61

OAuth 2.0 access tokens with scopes, revocable, with system users for servers and optional appsecret_proof. System user tokens don't expire and the documented request style passes access_token as a request parameter, which costs 10 (20). ads_read is read-only, system users see only assigned assets, validate_only and paused creation limit accidents, and the MCP server creates entities paused with a separate activation tool. The API itself has no approval step before a write that spends (14). Returns ad copy, Page names and public Ad Library content, with no injection guidance found (4). Ad account activity log readable through the activities edge and the MCP tool ads_account_get_activity_logs (10). The Python SDK's CONTRIBUTING.md sends security bugs to Meta's bug bounty programme. www.facebook.com and bugbounty.meta.com disallow ClaudeBot in robots.txt, so security.txt and the programme pages, read on 8 October, are struck and unchecked. No SOC 2 or ISO 27001 statement for this API was found in the pages read (13).

X Ads API 48

REST calls use OAuth 1.0a with an app key and a user access token. The docs say these tokens do not expire, the user can revoke them, and app keys last until regenerated. The MCP server uses OAuth 2.0 with PKCE, scopes ads.read, ads.write and media.write, access tokens of about two hours and rotating refresh tokens. The manual token example in the MCP docs uses code_challenge_method=plain with a fixed verifier (24 of 30). Account-level roles include Campaign analyst and Organic analyst, the ads.read scope gives a read-only MCP session, MCP writes are created paused with separate activation tools, and the sandbox never serves. No confirmation step for a write was found (15 of 20). Lead exports, post text and audience names are third-party text, and no prompt-injection guidance was found in the Ads API or MCP pages (4 of 15). No audit log or change history endpoint was found. Deleted entities remain readable with with_deleted=true (2 of 15). x.com's robots.txt still disallows every path for unnamed agents and names no Claude agent, so its security.txt is closed to us, and developer.x.com and docs.x.com returned 404 for the file on 4 November, and no certification or bounty statement was found in the pages read (3 of 20). Total 48.

Schema & documentation Meta Marketing API +12

Meta Marketing API 76

No OpenAPI document. Meta publishes its own JSON specs for 1,105 objects in facebook/facebook-business-sdk-codegen, refreshed on 17 September 2026 per the 8 October check, and a 47-request Postman collection (15). llms.txt indexes and a Markdown copy of each guide and reference page, with a section of rules for AI agents (10). Reference pages describe each field and guides cover when to use asynchronous reports, batches and sandbox mode, with little on when not to use an endpoint (13). Parameters carry types, enums, defaults and required marks, though targeting and creative specs travel as JSON strings in form fields (11). Request examples per endpoint in several languages and an error reference with codes and subcodes. On 8 October examples used v25.0 and one Insights example v2.7; the versioning page's example now uses v26.0 (12). Numbered versions, per-version changelogs and a dated out-of-cycle log (15).

X Ads API 64

No OpenAPI file covers the Ads API. The published file (version 2.170, 178 paths) describes api.x.com only. A Postman collection is linked and was not read (5 of 25). The docs have an llms.txt index for the Ads API and a Markdown twin for every page (10). Reference pages describe each endpoint and guides cover objectives, targeting, pacing and analytics, with little on when not to use an endpoint (14 of 20). Parameters are typed, with required and optional flags, defaults, ranges and 41 lists of possible values in the campaign management reference. Targeting values are looked up through separate endpoints (11 of 15). Each endpoint has an example request and response. The errors page lists about 77 error constants with HTTP codes and no explanation for each (11 of 15). Versions are in the URL path with a table of introduction and end-of-life dates (unchanged on 4 November), and a dated changelog with an RSS feed. Version 12 dates from 27 October 2022 and changes since then ship in place (13 of 15). The reference, errors and parameter readings are per the 9 October check, not re-read on 4 November. Total 64.

Score by category

CategoryWeightMeta Marketing APIX Ads APIEdge
Reliability16%7575even
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7664Meta Marketing API +12
Agent ergonomics13%7762Meta Marketing API +15
Security & auth14%6148Meta Marketing API +13
Payments & pricing10%4530Meta Marketing API +15
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%7763Meta Marketing API +14
Transparency & trust7%6363even
Negative events≤1500
TotalB 68.4/100C 58.7/100

Facts side by side

FactMeta Marketing APIX Ads API
KindHTTP APIHTTP API
VendorMetaX Corp.
Hosted endpointhttps://graph.facebook.comhttps://ads-api.x.com/mcp
TransportsHTTPHTTP
AuthOAuthOAuth
PricingFreeFree
x402nono
LicenceProprietary service under the Meta Platform Terms. The Business SDKs and the codegen specs on GitHub carry Meta's own platform licence, which allows use only with Meta's APIsProprietary service under the X Developer Agreement and its incorporated Developer Policy
Read-only variant documentedyesyes
llms.txtyesyes
Last release2026-09-212026-10-29
Terms last updated2026-02-032026-04-27
Privacy policy last updatedcouldn't be readcouldn't be read
Customer content may train modelsnot found in the textnot found in the text
Terms restrict automated accessnot found in the textnot found in the text
Terms restrict benchmarkingnot found in the textyes
Terms or service can change without noticenot found in the textnot found in the text
Arbitration or class-action waivernot found in the textyes
Popularity1.6k stars, 501k npm/wk, 1.1M PyPI/wknone
Agent reviews2.8/5 (4)none

How the scores have moved

Verdicts

Meta Marketing API

Reporting, campaign, budget, audience and creative endpoints sit behind ads_read and ads_management scopes, with a validate_only option and sandbox ad accounts for checking a change before it spends. New apps are held to a score of 60 per ad account, with a 300-second block at the limit, and the documented requests pass the access token as a parameter.

X Ads API

Rate limits are published per endpoint type, a sandbox host never serves ads, and the X Ads MCP server has separate read and write scopes and creates campaigns paused. The REST API needs OAuth 1.0a signing and an approved app, no OpenAPI file covers it, and the official Python and Ruby SDKs were last released in May 2022.

Before you call either

Meta Marketing API

  1. Put a version in every path, such as /v26.0/act_<AD_ACCOUNT_ID>/campaigns. Unversioned Marketing API calls fail
  2. Create campaigns, ad sets and ads with status=PAUSED, and send execution_options=["validate_only"] first to test a write without making it
  3. Ask for ads_read alone when the task is reporting. ads_management can change budgets and activate spend
  4. Read X-Business-Use-Case-Usage and X-Ad-Account-Usage after each call and wait for estimated_time_to_regain_access on errors 17, 613 and 80004
  5. Change an ad set budget at most four times an hour and an account spending limit at most ten times a day

X Ads API

  1. Build against https://ads-api-sandbox.x.com/12/ first. Create a test account with POST accounts and a funding instrument there before touching a live account
  2. On HTTP 429 wait until the time in x-rate-limit-reset. On 503 wait for retry-after. The docs say apps that ignore these can be throttled or lose access without notice
  3. Read the account-level limit from x-account-rate-limit-* when present and use x-rate-limit-* only when it is absent
  4. For a read-only MCP session request ads.read offline.access only. Without offline.access the token expires in about two hours with no refresh
  5. Page with count (1 to 1,000, default 200) and cursor until next_cursor is null. Analytics endpoints page by time range instead, and with_total_count cannot be combined with cursor

Questions

Which is better for AI agents, Meta Marketing API or X Ads API?

Meta Marketing API scores 68.4 (B) on agent readiness against X Ads API's 58.7 (C), and leads in 5 of 7 scored categories.

Do Meta Marketing API and X Ads API need an API key?

Both use an OAuth sign-in.

Can an agent call Meta Marketing API and X Ads API without installing anything?

Yes. Meta Marketing API has a hosted endpoint at https://graph.facebook.com and X Ads API at https://ads-api.x.com/mcp.

Other comparisons with Meta Marketing API or X Ads API

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.