Advertising5 min readBy Purrkey teamUpdated

How to check a Facebook ad by Meta Ad Library ID

Look up one Meta Ad Library ad by ID or URL and get the advertiser, creative text, call-to-action, platforms, and run dates as clean JSON

On this page

You have five Meta Ad Library ads on a competitor shortlist and need the advertiser, call-to-action, platforms and run dates for each one before a creative brief goes out. Pull each ad with anyapi.facebook.ad_details by ID or by Ad Library URL, then compare the five rows to decide which offer and placement to test next

The worksheet below is the deliverable. No run has been executed for this article, so values here are placeholders showing the shape

The worksheet you are filling

One row per ad, with the columns the brief asks for

adArchiveIdpageNamectaTextplatformsstartDateendDateactivesourceUrlnotes
from dataadvertiserCTA labellist or blankISO dateISO date or blanktrue or falselink from datayour call

The final column is where the judgement goes: which offer you read the ad as testing, and which placement you would try next

Example input, invented for this guide and to be replaced with your own shortlist. The contract's own example ID is 1185617869915074, and its URL form uses the same ID in the Ad Library URL

What goes in: one ID or one URL

The tool is called through POST /v1/runs with toolId anyapi.facebook.ad_details. Its input schema lists two properties, id and url, and requires exactly one of them. Submit the ad ID or the Ad Library URL, never both

id is a string, copied from the ad's Ad Library link. url is the full Ad Library URL of the form the contract gives. Pick one form per shortlist and keep it consistent, so a five-row list does not mix two input styles that behave differently at validation

That constraint sits at the input step, before anything is billed. A request that carries both fields does not match the schema, so fix the calls before you send the batch

Reading the row that comes back

Start with found. When it is false, data is null and reason is not_found. The contract says a found: false answer is a successful call, not an error, and costUsd is what it actually cost, so a delisted ad still gets a row with the reason recorded

When found is true, data holds the ad. These fields drive the decision:

  • data.active says whether the ad is currently running
  • data.startDate and data.endDate are epoch seconds, so convert them before the table. A null in either field is an unknown date, not zero
  • data.platforms is an array of publisher platforms, or null when the provider has none
  • data.ctaText is the call-to-action label and data.displayFormat is the creative format
  • data.creatives carries one entry per card for carousel, dynamic-product and dynamic-creative ads, each card with its own title, body, ctaText and linkUrl. Single-creative ads return an empty array, so an empty creatives is not a failure
  • data.media holds the images and videos in the order the ad presents them, and the contract warns that Meta CDN media URLs are signed and expire. Save the files you need instead of linking them into a deck
  • data.pageName, data.pageId and data.pageDeleted describe the advertiser, while data.sourceUrl is the inspectable Ad Library link a reviewer can open

Two rows that share a pageName but carry different ctaText values are a positioning test the advertiser is already running. A row with active false and a recent endDate is one that stopped. Keep adArchiveId as the key when you match rows across runs, because the contract calls it the stable identity

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to look up five
Meta Ad Library ads and return a table with adArchiveId, pageName,
ctaText, platforms, startDate, endDate, active, sourceUrl and notes.
Check the current inputs and price of anyapi.facebook.ad_details before
running anything. Pass exactly one of id or url per call, never both.
Make one call per ad, five calls in total. Convert startDate and endDate
from epoch seconds to ISO dates and leave them blank when null. When a
call returns found false, keep the row and write the reason in notes.
Do not substitute a different ad and do not look up IDs that are not on
the list.

Example IDs to replace:
1185617869915074
1185617869915075
1185617869915076
1185617869915077
1185617869915078

The last four IDs are invented placeholders, so swap them for your shortlist before the run. Run one call first to see the shape of data, then send the rest

Estimated tool cost

Prices read from the Purrkey catalog on November 12, 2026, revision anyapi-catalog-2026-11-05. The unit is max_call, which the catalog defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge", so the totals below are ceilings rather than settled charges

StepFormulaUnit pricePlanned quantityTotal
Single ad lookup1 call x max price$0.0012 per call1$0.0012
Five-ad competitor check5 calls x max price$0.0012 per call5$0.006

A call that returns found: false still costs a call, so plan five calls for five IDs even if one ad has been taken down. Model fees for the agent are not counted. A one-call trial ahead of the batch adds at most $0.0012

Run the check

Open the tool page at Facebook tools, copy your five Ad Library IDs and send the prompt above. If you want to widen the comparison across more advertisers first, the companion guide at compare competitor ads walks through the same fields across several shortlists

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Facebook.
Explore Facebook tools and pricing

FAQ

How do I check a Facebook ad by its Meta Ad Library ID?

Call the Facebook ad details tool with the ad ID from the Ad Library URL, or paste the full Ad Library URL instead. The response returns the advertiser, creative text, call-to-action, platforms and run dates for that one ad.

Can I pass both an ad ID and an ad URL?

No. The input schema's oneOf rule requires exactly one of id or url, so submit either the ID or the Ad Library URL, never both.

What does the response look like when the ad does not exist?

found comes back false, data is null and reason is not found. The contract treats that as a successful call, not an error, and the call still has its actual cost.

What format are the run dates in?

data.startDate and data.endDate are epoch seconds, so convert them before putting them in a table. Either field can be null, which means the date is unknown rather than zero.

Why is the creatives array empty for a single ad?

data.creatives holds one entry per card for carousel, dynamic-product and dynamic-creative ads. Single-creative ads return an empty array, and the same images and videos still appear in data.media.

How much does it cost to check five competitor ads?

Five calls at up to $0.0012 per call is at most $0.006. That total is a ceiling because the unit is a maximum per call, and a call that returns found false still costs a call.

Do the media links in the response stay valid?

The contract says Meta CDN media URLs are signed and expire. Save the images or video files you need instead of linking them into a deck you will open later.

Next step

Try this with Facebook

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Facebook tools

Share this article