GET /v1/meta_ads/ad

Meta Ad Library ad API: copy, creatives and run dates by ad id

Reads one ad from its advertiser's Meta Ad Library page and returns Post: copy, creatives, run dates, CTA, platforms and countries. Send the Ad Library id as ad_archive_id. An id the library does not answer is a 404.

Price
$0.0025 per call
Batch
Yes, through /v1/batch
Failed calls
Not charged

Example request

curl
curl 'https://api.virev.ai/v1/meta_ads/ad?ad_archive_id=161966936869658' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "GET",
    "https://api.virev.ai/v1/meta_ads/ad",
    params={
        "ad_archive_id": "161966936869658",
    },
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
ad_archive_id requiredquerystringThe numeric Ad Library ad id, id of an ad in any Meta Ads answer. Example 161966936869658.
cached queryauto | cache_only | liveauto (default) serves a read saved within the last 24 hours for these exact arguments, otherwise fetches. cache_only never contacts Meta Ads (404 not_cached when nothing is saved, whatever its age). live always fetches. Anything else is a 400. Default auto.
get_raw querybooleantrue returns the upstream JSON exactly as Meta Ads answered it instead of the normalized Post. Default false.

Example response

The example response of the API reference, with lists cut to their first 3 items and long text shortened.

json
{
  "data": {
    "id": "161966936869658",
    "shortcode": null,
    "taken_at": "2023-08-15T07:00:00+00:00",
    "kind": "carousel",
    "product_type": "DPA",
    "caption": "Entra a Nike.com y encuentra actualizaciones semanales de producto con envío gratis.",
    "hashtags": [],
    "mentions": [],
    "accessibility_caption": null,
    "likes": null,
    "comments": null,
    "views": null,
    "counts_hidden": null,
    "comments_disabled": null,
    "is_pinned": null,
    "is_paid_partnership": false,
    "owner": {
      "id": "15087023444",
      "username": "nike",
      "full_name": "Nike",
      "is_verified": null,
      "is_private": false,
      "avatar_url": "https://scontent.fmvd1-1.fna.fbcdn.net/v/t39.35426-6/367720191_2495585077311562_2373799605258111663_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=104&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=f-SvlYEYajcQ7kNvwHDTDfP&_nc_oc=AdryLKe_SUK…",
      "latest_story_at": null,
      "extra": {
        "category": "Sportswear",
        "likes": 39494361,
        "is_deleted": false,
        "url": "https://www.facebook.com/nike"
      }
    },
    "coauthors": [],
    "sponsors": [],
    "tagged": [],
    "location": null,
    "audio": null,
    "thumbnail_url": "https://scontent.fmvd4-1.fna.fbcdn.net/v/t39.35426-6/367963819_652036496870561_3033983014718682847_n.jpg?_nc_cat=107&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=xMavf1VqVhYQ7kNvwGbT-NC&_nc_oc=AdpzFwa0zP5UNILQvRqyyrU0taMf2JfmfTP…",
    "video_duration": null,
    "media": [
      {
        "kind": "image",
        "url": "https://scontent.fmvd4-1.fna.fbcdn.net/v/t39.35426-6/367963819_652036496870561_3033983014718682847_n.jpg?_nc_cat=107&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=xMavf1VqVhYQ7kNvwGbT-NC&_nc_oc=AdpzFwa0zP5UNILQvRqyyrU0taMf2JfmfTP…",
        "width": null,
        "height": null,
        "duration": null
      },
      {
        "kind": "image",
        "url": "https://scontent.fmvd2-2.fna.fbcdn.net/v/t39.35426-6/367742785_847403300215960_2275630920962394846_n.jpg?_nc_cat=103&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=exMqM5kN9M4Q7kNvwERoTFW&_nc_oc=AdqFBuA8tFKrwtZUt9FHugzobZLzDI2vspM…",
        "width": null,
        "height": null,
        "duration": null
      },
      {
        "kind": "image",
        "url": "https://scontent.fmvd3-1.fna.fbcdn.net/v/t39.35426-6/367693224_1243588693706245_2909314498320683993_n.jpg?_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=go3cAn0EBRQQ7kNvwHxRshq&_nc_oc=Adp6F4DhmQ1eUJNKrLOn0gnFAhUoBvoXBd…",
        "width": null,
        "height": null,
        "duration": null
      }
    ],
    "media_urls": [
      "https://scontent.fmvd4-1.fna.fbcdn.net/v/t39.35426-6/367963819_652036496870561_3033983014718682847_n.jpg?_nc_cat=107&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=xMavf1VqVhYQ7kNvwGbT-NC&_nc_oc=AdpzFwa0zP5UNILQvRqyyrU0taMf2JfmfTP…",
      "https://scontent.fmvd2-2.fna.fbcdn.net/v/t39.35426-6/367742785_847403300215960_2275630920962394846_n.jpg?_nc_cat=103&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=exMqM5kN9M4Q7kNvwERoTFW&_nc_oc=AdqFBuA8tFKrwtZUt9FHugzobZLzDI2vspM…",
      "https://scontent.fmvd3-1.fna.fbcdn.net/v/t39.35426-6/367693224_1243588693706245_2909314498320683993_n.jpg?_nc_cat=105&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=go3cAn0EBRQQ7kNvwHxRshq&_nc_oc=Adp6F4DhmQ1eUJNKrLOn0gnFAhUoBvoXBd…"
    ],
    "extra": {
      "url": "https://www.facebook.com/ads/library/?id=161966936869658",
      "is_active": false,
      "end_date": "2026-03-30T07:00:00+00:00",
      "title": "{{product.name}}",
      "link_caption": "nike.com/mx",
      "link_url": "https://ad.doubleclick.net/ddm/trackclk/N8893.2410306FACEBOOKADS/B30448992.373431644;dc_trk_aid=564542764;dc_trk_cid=196659869;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;ltd=;dc_tdv=1",
      "link_domain": "ad.doubleclick.net",
      "cta_type": "SHOP_NOW",
      "cta_text": "Shop now",
      "collation_id": null,
      "collation_count": null,
      "publisher_platforms": [
        "facebook",
        "instagram",
        "audience_network"
      ],
      "countries": [],
      "categories": [
        "UNKNOWN"
      ],
      "currency": null
    }
  },
  "meta": {
    "source": "live",
    "fetched_at": "2026-10-27T22:38:44.643677+00:00",
    "cost": "$0.0025",
    "balance": "$49.9900",
    "request_id": "req_dbcde0097aa65d16afedd964fb0cb3f6"
  }
}

How it works

One ad by its Ad Library id, read from its advertiser's library page: copy, creatives, run dates, CTA, platforms and countries. An id the library does not answer is a 404. Returns Post under data, read from the Ad Library as a signed-out guest.

An ad answers as a Post: the copy is caption, the start is taken_at, likes, comments and views are null because the Ad Library shows no engagement, and Ad Library facts (the library URL, is_active, end_date, the CTA, the link, publisher_platforms, countries) sit under extra. An advertiser answers as an Account, with Page likes under extra.likes. Unknown, unsupported, and repeated query parameters return 400 before acquisition or billing.

Billing: $0.0025 per call. A failed read is not charged.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
404cached=cache_only found nothing saved for these arguments (not_cached; call again with cached=auto to fetch it), or the Meta Ads account or item does not exist (not_found). You are not charged.
429Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.

Guides that use this endpoint