Facebook

Facebook data via Wire — pages, page posts, comments and the meta ad library as structured JSON

POSThttps://api.anakin.io/v1/wire/task

Pages, page posts, comments and the Meta Ad Library. Every Facebook action is a Wire action: call POST /v1/wire/task with the action_id and params below, then poll GET /v1/wire/jobs/{id} (or pass a webhook_url). All actions read public data — no login, no cookies, auth_mode: none.

Catalog: facebook · Actions: 4 · Auth: none · Billing: only successful calls are charged

Actionaction_idCreditsReturns
Page Profilefacebook_page_profile21 item
Page Postsfacebook_page_posts42+up to limit posts (default 10)
Post Commentsfacebook_post_comments210 comments per page
Ad Library Searchfacebook_ad_library_search230 ads per page

Credits marked + grow with limit — the exact formula is on each action. See Pricing for what a credit costs on your plan.


Call a Facebook action

The same call works for every action on this page — swap action_id and params.

curl -X POST https://api.anakin.io/v1/wire/task \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"action_id": "facebook_page_profile", "params": {"page": "https://www.facebook.com/NASA"}}'

The job result wraps the action's output: data.status is "ok" or "error", and data.data holds the fields shown under each action below. See the overview for the full envelope.


Page Profile

Get a public Facebook page: name, category, intro, followers, likes, website, email, creation date, ad status, avatar and cover.

action_id: facebook_page_profile · Credits: 2 / call · Returns: 1 item

ParameterTypeDescription
action_id requiredstringSet to facebook_page_profile
params.page requiredstringFacebook page URL or page username.

Request

{
  "action_id": "facebook_page_profile",
  "params": {
    "page": "https://www.facebook.com/NASA"
  }
}

Response — data.data of the completed job (trimmed):

{
  "page_id": "100044561550831",
  "name": "NASA - National Aeronautics and Space Administration",
  "url": "https://www.facebook.com/NASA",
  "category": "Government organization",
  "intro": "Explore the universe and discover our home planet. \nThere's space for everybody. ✨",
  "followers": 28000000,
  "likes": 28714332,
  "talking_about": 124693,
  "website": "https://www.nasa.gov/nasa-app/",
  "email": "public-inquiries@hq.nasa.gov",
  "created": "March 4, 2009",
  "running_ads": "This Page isn't currently running ads.",
  "profile_image_url": "https://scontent.fric1-1.fna.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?…",
  "cover_image_url": "https://scontent.fric1-1.fna.fbcdn.net/v/t39.99422-6/809146614_4484013928506139_3181913787670602881_n.png?…"
}

Paging: pass page: 2, 3, … for the next pages.


Page Posts

Get a Facebook page's latest posts (10 by default, up to 60): text, date, reactions, comments, shares, video views, link and image.

action_id: facebook_page_posts · Credits: 42 for up to 10 results, +5 per extra result (max 60) · Returns: up to limit posts (default 10)

ParameterTypeDescription
action_id requiredstringSet to facebook_page_posts
params.page requiredstringFacebook page URL or page username.
params.limitintegerHow many posts to return, 1 to 60. Up to 10 costs 42 credits; each post beyond 10 adds 5 credits. Default 10

Request

{
  "action_id": "facebook_page_posts",
  "params": {
    "page": "https://www.facebook.com/NASA",
    "limit": 10
  }
}

Response — data.data of the completed job (trimmed):

{
  "page_url": "https://www.facebook.com/NASA",
  "posts": [
    {
      "post_id": "1656760789152624",
      "url": "https://www.facebook.com/NASA/posts/pfbid0UQkYmBMPZYZi3s8yUheTZjKVMfZjtCmoz1S8SMEYDU49FZz8ehJJDJViGam7K3yGl",
      "text": "Have you seen our new episode of Planetary Defenders yet?\n\nScientists are keeping their eyes on the skies to protect humanity from asteroids and other impact…",
      "posted_at": "2026-10-14T15:16:24.000Z",
      "reactions": 392,
      "comments": 36,
      "shares": 47,
      "video_views": null,
      "link": "https://youtu.be/5b3n-u_0QAI",
      "image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.99422-6/849427776_1715330046678556_3790380664559655092_n.png?…"
    },
    {
      "post_id": "1655978522564184",
      "url": "https://www.facebook.com/reel/1686472756520976/",
      "text": "Just a few more weeks until our biggest event of the year!\n\nMAX POWER, a new aerospace tech expo and air show, is happening Nov. 7-8 at NASA's Kennedy Space…",
      "posted_at": "2026-10-13T19:47:15.000Z",
      "reactions": 766,
      "comments": 41,
      "shares": 93,
      "video_views": 127521,
      "link": "https://go.nasa.gov/4iiNPN3",
      "image_url": "https://scontent-iad3-2.xx.fbcdn.net/v/t15.5256-10/847835249_1688832406137847_8182732833181089721_n.jpg?…"
    },
    "… 8 more"
  ],
  "count": 10,
  "message": null
}

Paging: pass page: 2, 3, … for the next pages. Cost: 42 credits for up to 10 results; each result beyond 10 adds 5 credits, up to limit: 60.


Post Comments

Get the comments on a Facebook post, one full page (about 10) per call: text, date, reactions, reply count and commenter name. Use cursor for more.

action_id: facebook_post_comments · Credits: 2 / call · Returns: 10 comments per page

ParameterTypeDescription
action_id requiredstringSet to facebook_post_comments
params.post_url requiredstringLink to the Facebook post, video or reel.
params.cursorstringLeave empty for the first page. For the next page, pass the next_cursor value from the previous response (next_cursor is null when there are no more).

Request

{
  "action_id": "facebook_post_comments",
  "params": {
    "post_url": "<cursor from the previous page>"
  }
}

Response — data.data of the completed job (trimmed):

{
  "post_url": "https://www.facebook.com/NASA/posts/pfbid0t5jfbXqtnpjTDMLkzsaRzJpWNqJ9pbkTtwiTHmTzyF6n1dAoU2WQ4TkAMJXnKYK2l",
  "comments": [
    {
      "comment_id": "Y29tbWVudDoxNjQ5NDM1MjY2NTUxODQzXzIwMzcwNjAyNjc0NzQ2NjM=",
      "text": "I hope that when the first crewed mission goes to visit Mars, they will be able to see the sunset just as Luke Skywalker did on his home planet.",
      "created_at": "2026-10-06T22:13:21.000Z",
      "reactions": 14,
      "replies": 7,
      "author_name": "Daniel Manterola"
    },
    {
      "comment_id": "Y29tbWVudDoxNjQ5NDM1MjY2NTUxODQzXzIzOTA4MTM2MzgzMjY1MDc=",
      "text": "The Sun does not move anywhere; the planet Mars rotates just like Earth.",
      "created_at": "2026-10-07T06:33:40.000Z",
      "reactions": 8,
      "replies": 6,
      "author_name": "Jari Välimaa"
    },
    "… 8 more"
  ],
  "count": 10,
  "next_cursor": "MToxNzkyMDYwNDk1OgF_tDneeKqhiAEO0V0wD-Z5LJNtgkpGu433oU6ou4CqaQHhmIRCB0lvQOXe4nnmKlA2OkJIG-EED6wVPjQJaGPaJn-s8aihlsc5wPoe7u0T9zd2vsUpHDID7N9RVQkYZ5AMQyKJHD577…",
  "message": null
}

Paging: the first call returns next_cursor; pass it back as cursor for the next page (null when there are no more). Each page is a new call.


Search the Meta Ad Library by keyword, one full page (about 30 ads) per call: advertiser, active flag, run dates, platforms, ad text, title, call to action, link, images and videos. Use cursor for more.

action_id: facebook_ad_library_search · Credits: 2 / call · Returns: 30 ads per page

ParameterTypeDescription
action_id requiredstringSet to facebook_ad_library_search
params.query requiredstringKeyword or advertiser name.
params.countrystring2-letter country code to filter ads by; leave empty for all countries. Default "US"
params.cursorstringLeave empty for the first page. For the next page, pass the next_cursor value from the previous response (next_cursor is null when there are no more).

Request

{
  "action_id": "facebook_ad_library_search",
  "params": {
    "query": "nike",
    "country": "US"
  }
}

Response — data.data of the completed job (trimmed):

{
  "query": "nike",
  "country": "US",
  "ads": [
    {
      "ad_id": "1107386451952079",
      "ad_library_url": "https://www.facebook.com/ads/library/?id=1107386451952079",
      "page_name": "Nike",
      "page_id": "15087023444",
      "active": true,
      "started_at": "2026-09-01T07:00:00.000Z",
      "ended_at": "2026-10-14T07:00:00.000Z",
      "platforms": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "body": "Run through summer with gear that can take the heat.",
      "title": "Nike Air Monarch IV ",
      "cta": "Shop now",
      "link_url": "https://www.nike.com/",
      "image_urls": [
        "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/787341597_1403139668417555_3205388062094203287_n.jpg?…",
        "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/789651943_1043044048543987_7497332784635444585_n.jpg?…",
        "… 4 more"
      ],
      "video_urls": []
    },
    {
      "ad_id": "1550534860016399",
      "ad_library_url": "https://www.facebook.com/ads/library/?id=1550534860016399",
      "page_name": "Perfect themes",
      "page_id": "115939511520844",
      "active": true,
      "started_at": "2026-05-19T07:00:00.000Z",
      "ended_at": "2026-10-14T07:00:00.000Z",
      "platforms": [
        "FACEBOOK",
        "INSTAGRAM",
        "… 3 more"
      ],
      "body": "🔥🍭Themepack is a FREE and personalized APP😍 various styles of Theme💎 、Weather💖、Photo😊、Clock、Calendar to pick any widget to dress up your home screen!",
      "title": "𝕊𝕦𝕡𝕖𝕣 𝕙𝕠𝕥 𝕨𝕚𝕕𝕘𝕖𝕥𝕤 𝕒𝕡𝕡 !",
      "cta": "Install now",
      "link_url": "http://play.google.com/store/apps/details?id=com.iconchanger.widget.theme.shortcut",
      "image_urls": [
        "https://scontent-bos5-1.xx.fbcdn.net/v/t39.35426-6/700927950_933331229664450_6487763311056032772_n.jpg?…"
      ],
      "video_urls": []
    },
    "… 28 more"
  ],
  "count": 30,
  "next_cursor": "AQHTj27RfBw3ehkqQZaQlEyjvSvTbVDJ1pXsS4-nBP0BF_VQgjVhZvdaI_3wJajPAxAd",
  "message": null
}

Paging: the first call returns next_cursor; pass it back as cursor for the next page (null when there are no more). Each page is a new call.