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
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.
21 ready-to-call endpoints
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.
Search Facebook Ad Library ads
Searches the Meta Ad Library by keyword with country, status, media type, language and date filters. Paginate with `cursor`.
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`.
Search Facebook Ad Library advertisers
Returns Meta Ad Library advertisers whose name matches a query, with Page ids for /facebook/advertisers/{id}/ads.
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.
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`.
Search Facebook events
Returns public Facebook events whose name matches a query, with dates, place and attendance. Paginate with `cursor`.
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.
List posts in a public Facebook group
Returns posts from a public Facebook group with text, media, author and engagement counts. Paginate with `cursor`.
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.
Search Facebook Marketplace locations
Returns Facebook Marketplace locations that match a place name, with the coordinates /facebook/marketplace/search needs.
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`.
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.
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`.
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.
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.
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.
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`.
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`.
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`.
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`.