Advertising5 min readBy Purrkey teamUpdated

How to pull one Facebook ad's creative details by ad ID

Send one Meta Ad Library ad ID and get back each carousel variant, image and video URL, headline, body and call to action

On this page

You have 12 competitor ad IDs saved from Meta Ad Library and need to inspect each creative before revising offer copy. One call to anyapi.facebook.ad_details_full takes a single ad ID and returns that ad's format, variant copy, media links, call to action and run dates, so you can rank which ads to counter and which to emulate

No run was executed for this article. The tables below are a design, not a record of a pull

The worksheet the run should produce

One row per ad ID, eleven columns taken from the output contract. Values here are placeholders showing the shape

adArchiveIdpageNamedisplayFormattitlebodyctaTextlinkUrlcreatives.titlecreatives.imagecreatives.videoUrlsourceUrl
(ID string)(page name)(DPA, VIDEO or IMAGE)(headline)(body text)(CTA label)(destination URL)(variant headline)(image URL)(video URL)(Ad Library URL)

Sort the finished sheet by displayFormat and the format clusters tell you where to spend attention. A cluster of VIDEO rows against one advertiser is a different counter-brief than a wall of static images

The input: one ad ID per call

id is required and takes the numeric ad ID from a Meta Ad Library URL. The contract's own example uses 962050096457659 as the ad ID

Example ID for this guide: 109384756201337. That value is invented for illustration, so replace it with a real ID from your saved list

Each call returns one ad, so the 12-ID task is 12 calls and the sheet fills row by row. The contract documents id as the required property; check the current inputs and price before you queue the batch

Reading the output fields

found is the first field to check. When it is false, reason is not_found, which the contract defines as the source stating the target does not exist or returning nothing for it. A found: false answer is a successful call, not an error, and costUsd is what it actually cost

displayFormat gives the creative shape, with contract examples of DPA, VIDEO and IMAGE. adArchiveId, sourceUrl, pageId and pageName are populated whenever the provider has data for the entity, and sourceUrl is the inspectable Ad Library link worth keeping in the sheet for review

For a carousel or dynamic ad, creatives holds one entry per variant in the order Meta returns them, each carrying title, body, ctaText, linkUrl, image and videoUrl. A single-creative ad returns an empty creatives array and carries its media in images or videos instead, so an empty variant list is a format signal rather than a failed pull

Meta CDN media URLs are signed and expire, so fetch images and videos when you read the ad. A link parked in the sheet for a later pass may not open

Dates come back as startedUtc and endedUtc, UTC epoch timestamps in seconds; multiply by 1000 for a JS Date. The contract notes that endedUtc is the run end or the last-seen date while the ad is still running, and active marks whether it is running now

Dynamic-product ads return a title template such as {{product.name}} rather than a finished headline, so read those rows with the variant copy beside them

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to pull creative details
for the Facebook ad IDs below. Check the current inputs and price of
anyapi.facebook.ad_details_full before running anything. Call the tool once per
ad ID and return one table row per ID with adArchiveId, pageName,
displayFormat, title, body, ctaText, linkUrl, creatives.title, creatives.image,
creatives.videoUrl and sourceUrl. When several carousel variants come back,
repeat the variant columns or note the variant count. When found is false, keep
the row and mark it not_found. Record media URLs as returned and do not download
files.

Example ID: 109384756201337

Swap the example ID for the 12 you saved. Keep the field list in the prompt intact so the returned table matches the worksheet you designed

Estimated tool cost

Prices read through the Purrkey catalog on November 12, 2026, price revision anyapi-catalog-2026-11-05. The tool is listed at max_call, defined in the catalog as "Maximum per call. Successful runs settle at the actual AnyAPI charge." Totals below are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
Inspect one adcalls x max price$0.00462 per call1$0.00462
Audit 20 ad IDscalls x max price$0.00462 per call20$0.0924

Path: the tool is called through POST /v1/runs with toolId anyapi.facebook.ad_details_full

Model fees for the agent are not counted. The 12-ID task sits between the two rows: 12 calls at the same ceiling is $0.05544. A not_found row still consumes a call, so budget for it like any other row

Run the first ad ID

Send one ID through before you queue the remaining eleven, then check that the returned creatives shape matches the ad you saw in Ad Library. The tool page is Facebook tools

For a side-by-side view of several advertisers rather than a single ad, the companion guide is compare competitor ads

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 get a Facebook ad's creative details from its ad ID?

Call the Facebook ad details tool with the numeric ID from the Ad Library URL. One call returns one ad: format, headline, body, call to action, carousel variants, image and video URLs, and run dates.

Where is the ad ID in a Meta Ad Library URL?

It is the numeric value after id= in a Meta Ad Library URL. The contract example uses 962050096457659.

How are carousel variants returned?

creatives holds one entry per variant in the order Meta returns them, each with title, body, ctaText, linkUrl, image and videoUrl. Single-creative ads return an empty creatives array and carry their media in images or videos.

What does a not found result mean?

found is false and reason reports not found, which means the source states the target does not exist or returned nothing for it. The contract treats it as a successful call, and costUsd reports the actual cost.

Why do the media URLs in the output expire?

Meta CDN media URLs are signed and expire, so fetch images and videos when you read the ad rather than storing the link for a later pass.

How much does it cost to inspect 20 ad IDs?

At the $0.00462 maximum call price, 20 calls are at most $0.0924. Successful runs settle at the actual AnyAPI charge, so that figure is a ceiling.

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