InsightSocial API

Facebook

Facebook API reference: 29 endpoints for pages, posts, comments, groups, Marketplace and the Meta Ad Library. Per-endpoint credit prices and cURL examples.

Pages and profiles, posts, comments, groups, reels, photos, events, Marketplace, search and the Meta Ad Library.

New to the API? Read the Facebook scraper API overview for what it returns and how it compares with the official API.

Base path: /v1/facebook/...

Quickstart

cURL
curl "https://api.insightsocial.app/v1/facebook/profile?url=https%3A%2F%2Fwww.facebook.com%2FMeta" \
  -H "x-api-key: $INSIGHTSOCIAL_API_KEY"

Endpoints

8 of these are metered: the price depends on how much the call reads. See Credits.

6 are beta: they return the source's own structure under our naming rules (snake_case keys, string ids, ISO times where the source gives a timestamp) rather than a schema-2 entity, and their fields may change. See Schema 2.

EndpointCreditsWhat it returnsKey parameters
/profile10Returns a Facebook page's public profile: page id, display name, profile image, bio, follower count, and page-like count.url
/profile/posts10–40Returns recent posts from a Facebook page or profile, each with the post text, like and comment counts, the per-reaction breakdown, media, and publish time.url, pageId
/post10Returns one Facebook post in full: the post text, like, comment and share counts, a reactions breakdown, media attachments, and author info.url
/post/comments10Returns comments on a Facebook post, each with the commenter's name, comment text, like count, reply count, and creation time.url, feedback_id
/group/posts10Returns posts from a Facebook group, 3 to 4 per page, each with the post text, reaction count, comment count, the per-reaction breakdown, and author info.url, group_id
/group10Returns a Facebook group's public record: name, description, member count, privacy, visibility, and creation date.url, group_id
/post/transcript100Returns the spoken words of a Facebook video post as a transcript, using Facebook's auto-generated captions.url
/profile/photos10–90Returns a page or profile's photos, each with a photo id, permalink, full-size image URL, thumbnail, and accessibility caption when available.url
/profile/reels10Returns a page or profile's reels, each with a reel id, description, thumbnail, permalink, publish time, and a rounded public view count.url
/adlibrary/ad50Returns one ad from the Facebook Ad Library: creative, CTA and link, run dates, display format, and the advertiser's page URL, likes and categories.id, url
/adlibrary/company/ads50–350Returns the ads one company or page is running in the Facebook Ad Library, each with its creative, status, spend, and targeting info.pageId, companyName
/adlibrary/search/ads50Returns Facebook Ad Library ads matching a keyword, each with its creative text, images, sponsor info, and running status. Beta.query
/adlibrary/search/companies50Returns advertiser pages in the Facebook Ad Library matching a name, each with its page id, name, handle, verification badge and follower count.query
/profile/events10–90Returns a Facebook page's upcoming and past events, each with a title, link, the start time, the venue, the city, the rendered time line, and the cancelled, past and online flags.url
/post/comment/replies10Returns the replies under a single Facebook comment, each with the author name, reply text, like count, and creation time.feedback_id, expansion_token
/marketplace/location/search10Returns Facebook Marketplace locations and cities matching a search term, each with its lat and lng coordinates. Beta.query
/marketplace/search10Returns Facebook Marketplace listings near a lat/lng, each with title, price, location, photo, delivery types, and sold or live flags. Beta.query, lat, lng
/marketplace/item10Returns one Facebook Marketplace listing: title, description, price, location, condition, photos, seller, and availability flags.id, url
/events/search10Returns public Facebook events matching a keyword, each with name, date sentence, venue, cover photo, interested and going counts, and online and past flags. Beta.query
/events10–130Returns the events listed on a Facebook city or region events page, each with a title, link, cover image, the start time, the venue, and the going and interested counts.url
/event/details10Returns one Facebook event in full: title, description, start and end time, location, host, cover image, and RSVP counts when shown.id, url
/adlibrary/ad/transcript100Returns the spoken words of a Facebook Ad Library video ad, from Facebook's captions when available or transcribed from the video itself.id, url
/profile/full50Returns a page's profile plus its latest 3 posts in one call. Beta.url
/profile/reels/full50–250Returns a page's reels with exact per-reel engagement merged in: views, likes, comments, and shares, plus each reel's id, thumbnail, and link. Beta.url
/search/posts10–50Returns public Facebook posts matching a keyword, each with text, permalink, publish time, like count, comment count, and author.query
/search/pages10Returns Facebook pages matching a keyword, each with page id, display name, permalink, avatar, and verified flag.query
/search/people10Returns Facebook people matching a keyword, each with profile id, display name, permalink, avatar, and verified flag.query
/search/videos10Returns public Facebook videos matching a keyword, each with video id, caption, permalink, thumbnail, and author.query
/search/groups10–110Returns public Facebook groups matching your keywords, one row per group, with the group's name, id and URL in the same shape the group endpoints take.query

On this page