Social platformsLive

Facebook API for AI agents

Read public Facebook pages, posts, reels, comments, groups, events and Marketplace listings, and search the Meta Ad Library, as unified JSON.

Using ChatGPT, Claude Code or another client? See the setup steps

Agent workflows

Use Facebook records as evidence, not glue code.

UnifAPI keeps the public Facebook surface discoverable through MCP and callable over HTTP. Agents can inspect the schema, fetch only the records needed for the task, and return the result with request, pagination, and billing metadata intact.

Pull a public Facebook page's posts, reels, photos, events and comment threads for brand, creator and community research.

Search the Meta Ad Library by keyword or advertiser and list the ads a page is running for competitive ad intelligence.

Search Facebook events and Marketplace listings by city or keyword for local demand, pricing and event discovery workflows.

Endpoints

21 ready-to-call endpoints

GET/facebook/ads/{id}$min $0.003

Get a Facebook Ad Library ad

Returns one ad from the Meta Ad Library by archive id: advertiser, creative, run dates, platforms and, for EU ads, reach and targeting. Set `include_transcript` for a video transcript. Returns `not_found` when the ad does not exist.

Details →
GET/facebook/ads/search$min $0.003

Search Facebook Ad Library ads

Searches the Meta Ad Library by keyword with country, status, media type, language and date filters. Paginate with `cursor`.

Details →
GET/facebook/advertisers/{id}/ads$min $0.003

List ads a Facebook Page is running

Returns ads from the Meta Ad Library for one advertiser Page id, with country, status, media type, language and date filters. Find Page ids with /facebook/advertisers/search. Paginate with `cursor`.

Details →
GET/facebook/advertisers/search$min $0.003

Search Facebook Ad Library advertisers

Returns Meta Ad Library advertisers whose name matches a query, with Page ids for /facebook/advertisers/{id}/ads.

Details →
GET/facebook/events/{id}$min $0.003

Get a Facebook event

Returns one public Facebook event by id: schedule, place, hosts, attendance and tickets. Returns `not_found` when the event does not exist or is not public.

Details →
GET/facebook/events/explore$min $0.003

List Facebook events for a city

Returns public Facebook events for a city from its Facebook Events explore URL, optionally limited to a time window. Paginate with `cursor`.

Details →
GET/facebook/events/search$min $0.003

Search Facebook events

Returns public Facebook events whose name matches a query, with dates, place and attendance. Paginate with `cursor`.

Details →
GET/facebook/groups/{id}$min $0.003

Get a public Facebook group

Returns a public Facebook group by id or vanity name: name, description, privacy, member count and activity. Returns `not_found` when the group does not exist or is not public.

Details →
GET/facebook/groups/{id}/posts$min $0.003

List posts in a public Facebook group

Returns posts from a public Facebook group with text, media, author and engagement counts. Paginate with `cursor`.

Details →
GET/facebook/marketplace/items/{id}$min $0.003

Get a Facebook Marketplace listing

Returns one Facebook Marketplace listing by item id: price, description, photos, attributes, seller and delivery options. Returns `not_found` when the listing does not exist or was removed.

Details →
GET/facebook/marketplace/locations/search$min $0.003

Search Facebook Marketplace locations

Returns Facebook Marketplace locations that match a place name, with the coordinates /facebook/marketplace/search needs.

Details →
GET/facebook/marketplace/search$min $0.003

Search Facebook Marketplace listings

Returns Facebook Marketplace listings for a keyword near a latitude and longitude, with price, condition and delivery filters. Paginate with `cursor`.

Details →
GET/facebook/posts$min $0.003

Get a Facebook post or Reel by URL

Returns one public Facebook post or Reel by its URL: author, text, media, music and reaction, comment and share counts. Set `include_comments` or `include_transcript` for a comment sample or a video transcript. Returns `not_found` when the post does not exist or is not public.

Details →
GET/facebook/posts/comments$min $0.003

List comments on a Facebook post or Reel

Returns top-level comments on a public Facebook post or Reel by URL. A comment's `replies_cursor` lists its replies through /facebook/posts/comments/replies. Paginate with `cursor`.

Details →
GET/facebook/posts/comments/replies$min $0.003

List replies to a Facebook comment

Returns replies to one Facebook comment. Pass the comment's `replies_cursor` as `cursor`, then each response's `pagination.next_cursor` for the next page.

Details →
GET/facebook/posts/transcript$min $0.003

Get the transcript of a Facebook video post

Returns the spoken-word transcript of a public Facebook video post or Reel by URL, for videos up to a few minutes long. Returns `not_found` when the post does not exist.

Details →
GET/facebook/profiles/{username}$min $0.003

Get a Facebook profile or Page

Returns a public Facebook profile or Page by username: name, category, intro, follower and like counts, contact details and business information. Returns `not_found` when it does not exist or is not public.

Details →
GET/facebook/profiles/{username}/events$min $0.003

List events hosted by a Facebook profile or Page

Returns public events hosted by a Facebook profile or Page with dates, place and attendance. Paginate with `cursor`.

Details →
GET/facebook/profiles/{username}/photos$min $0.003

List photos from a Facebook profile or Page

Returns public photos from a Facebook profile or Page with image URLs and captions. Paginate with `cursor`.

Details →
GET/facebook/profiles/{username}/posts$min $0.003

List posts from a Facebook profile or Page

Returns recent public posts from a Facebook profile or Page with text, media and reaction, comment and share counts. Paginate with `cursor`.

Details →
GET/facebook/profiles/{username}/reels$min $0.003

List Reels from a Facebook profile or Page

Returns public Reels from a Facebook profile or Page with captions, play counts and video URLs. Paginate with `cursor`.

Details →