APIs / Social media / Facebook
1 credit per call21 endpointsChecked working 6 Dec 2026
Facebook API
Facebook API for public pages, page posts, events, Marketplace listings, reels and profile search as JSON. 21 endpoints, 1 credit per successful call.
curl "https://api.perceptlayer.com/v1/facebook/marketplace-search?query=bike&location=San+Francisco" \
-H "X-API-Key: $API_KEY"Playground
Run this API
curl "https://api.perceptlayer.com/v1/facebook/marketplace-search?query=bike&location=San+Francisco" \
-H "X-API-Key: $API_KEY"Facebook · 21 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.
| Endpoint | Required parameters | Returns | Cost |
|---|---|---|---|
GET/v1/facebook/event | event_idNeeds terms | event | 1 credit |
GET/v1/facebook/event-post | permalinkNeeds terms | JSON | 1 credit |
GET/v1/facebook/events | query+1 optionalNeeds terms | eventsevents_countsearch_parameters | 1 credit |
GET/v1/facebook/group | group_idNeeds terms | group | 1 credit |
GET/v1/facebook/group-posts | group_idNeeds terms | post_idcreation_timeauthor_nameauthor_pfbidpermalink_url | 1 credit |
GET/v1/facebook/marketplace-browse | none+1 optionalNeeds terms | listingslistings_countresolved_location | 1 credit |
GET/v1/facebook/marketplace-item | listing_idNeeds terms | itemrelated_listingsrelated_listings_count | 1 credit |
GET/v1/facebook/marketplace-search | none+2 optionalNeeds terms | listingslistings_countfilters_countcategoriescategories_countno_results+2 more | 1 credit |
GET/v1/facebook/page | handleNeeds terms | JSON | 1 credit |
GET/v1/facebook/page-about | handleNeeds terms | about | 1 credit |
GET/v1/facebook/page-events | handleNeeds terms | idnameplaceis_canceled | 1 credit |
GET/v1/facebook/photo | photoNeeds terms | photo | 1 credit |
GET/v1/facebook/photos | handleNeeds terms | idaccessibility_caption | 1 credit |
GET/v1/facebook/post | permalinkNeeds terms | post | 1 credit |
GET/v1/facebook/profile | handleNeeds terms | profile | 1 credit |
GET/v1/facebook/profile-about | handleNeeds terms | about | 1 credit |
GET/v1/facebook/profile-feed | handleNeeds terms | post_idcreation_timeactor_name | 1 credit |
GET/v1/facebook/reel | permalinkNeeds terms | reel | 1 credit |
GET/v1/facebook/reels | handleNeeds terms | idpost_idcreation_timeowner_nameduration_secondspermalink_url | 1 credit |
GET/v1/facebook/search-profiles | query+1 optionalNeeds terms | itemsitems_countsearch_parameterscoverage | 1 credit |
GET/v1/facebook/videos | handleNeeds terms | idplayable_url | 1 credit |
Overview
About the Facebook API
What you can get
The Facebook API returns public Facebook data as JSON through 21 endpoints. These are restricted endpoints: the restricted-endpoint terms apply, and they don't permit collecting personal data without a lawful basis or using it to contact people.
- Pages:
page,page-about,page-events,photos,videosandreelsby the page'shandle. - Posts and media:
post,reelandevent-postbypermalink, andphotobyphoto. - Events:
eventsfor aqueryandlocation, andeventbyevent_id. - Marketplace:
marketplace-searchfor aqueryandlocation,marketplace-browsebylocation, andmarketplace-itembylisting_id. - Groups:
groupandgroup-postsbygroup_id. - Profiles:
profile,profile-aboutandprofile-feedbyhandle;search-profilesfor aquery, withlimit.
How a call works
Most calls take one identifier. GET /v1/facebook/page?handle=... returns a public page; GET /v1/facebook/marketplace-search?query=bike&location=... searches Marketplace listings, and marketplace-item takes a listing_id. Every successful call costs 1 credit; failed calls cost nothing.
More social media APIs
Use cases
Monitor your brand's and competitors' public pages
Use the Facebook API to monitor your brand's and competitors' public pagesFind public events by topic and city
Use the Facebook API to find public events by topic and cityTrack Marketplace asking prices for a product in an area
Use the Facebook API to track Marketplace asking prices for a product in an areaReview public posts and reels from pages you follow
Use the Facebook API to review public posts and reels from pages you followFAQ
Questions
Do I need a Facebook API key or a Meta app?
No. You call this Facebook API with your Perceptlayer key in the `X-API-Key` header, so there's no separate app or access token to set up. You do need to accept the restricted-endpoint terms first.
How much does the Facebook API cost?
Each successful call costs one credit, on every endpoint. New accounts get free credits to start, and credit packs bring the price down as you scale.
What format are responses in?
Every endpoint returns JSON, with no HTML parsing on your side.
Is this the official Facebook API?
No. Perceptlayer is an independent service and is not affiliated with Facebook. It returns Facebook data as JSON with a Perceptlayer key, so there is no Facebook developer account, app review or partner approval to get first. It only reads data: if Facebook has an official API and you need to act on your own Facebook account, such as posting, managing orders or reading private data, use that one.
Should I build a Facebook scraper instead?
You can, but a Facebook scraper is code you maintain: page changes break it, requests get blocked, and Facebook's terms govern how you collect data. The Facebook API gives you 21 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first. Some of these endpoints return social or personal data and need the restricted-endpoint terms; collect only what you have a lawful basis for.
Try the Facebook API with 100 free credits
No credit card. Failed calls are never billed.