Facebook / Search
Search All
Search Facebook's All tab. Each parsed item costs 4 credits.
01
Request
POST /facebook/search/all with your bearer API key.
| query | Required search text. |
| recent | Optional boolean: newest results first. |
| location_id | Optional numeric Facebook location ID. |
| start_date | First posted date, inclusive, YYYY-MM-DD. Send with end_date. |
| end_date | Last posted date, inclusive, YYYY-MM-DD. Send with start_date. |
| cursor | Omit initially. Send data.pagination.cursor unchanged with the same query and filters to continue. |
▸ ▾ request {}
{"query":"gardening","recent":true}Each call returns one page. Stop when data.pagination.has_next_page is false. Billing is 4 times the total number of items in posts, users, pages, groups, videos, events and marketplace. Nothing in data.results is charged.
You need at least 1 credit before a search starts; an empty balance returns 402. Empty results cost nothing. If the page costs more than your remaining balance, you receive the full page and only the remaining credits are deducted. cost shows the actual charge. Failed fetches are not charged.
02
Response sample
▸ ▾ response {} — illustrative; native card and media details shortened
{
"cost": 24,
"created_at": 1790812800,
"request_duration": 310,
"parse_duration": 1,
"data": {
"posts": [
{
"id": "100000000000101",
"url": "https://www.facebook.com/communityupdates/posts/100000000000101/",
"created_at": 1790812800,
"text": "An update from our community.",
"author": {
"id": "100000000000001",
"name": "Community Updates",
"url": "https://www.facebook.com/communityupdates/"
},
"group": {
"id": null,
"name": null,
"url": null
},
"engagement": {
"reaction_count": 10,
"comment_count": 3,
"share_count": 1
},
"media": [],
"shared_post": null
}
],
"users": [],
"pages": [
{
"id": "100000000000001",
"type": "User",
"name": "Community Updates",
"url": "https://www.facebook.com/communityupdates/",
"profile_picture_url": null,
"is_verified": false,
"summary": "Community · 2.1K followers",
"subtitle": null,
"description_snippets": [
"News from our community."
],
"join_state": null,
"has_membership_questions": null
}
],
"groups": [
{
"id": "100000000000003",
"type": "Group",
"name": "Community Gardeners",
"url": "https://www.facebook.com/groups/100000000000003/",
"profile_picture_url": null,
"is_verified": null,
"summary": "Public · 1.2K members · 3 posts a day",
"subtitle": null,
"description_snippets": [
"Share gardening tips with your neighbours."
],
"join_state": "CAN_JOIN",
"has_membership_questions": false
}
],
"videos": [
{
"id": "100000000000102",
"url": "https://www.facebook.com/reel/100000000000201/",
"created_at": 1790812800,
"text": "A quick look around our community garden.",
"author": {
"id": "100000000000001",
"name": "Community Updates",
"url": "https://www.facebook.com/communityupdates/"
},
"group": {
"id": null,
"name": null,
"url": null
},
"engagement": {
"reaction_count": 10,
"comment_count": 3,
"share_count": 1
},
"media": [
{
"type": "StoryAttachmentUnifiedLightweightVideoStyleRenderer",
"id": "100000000000201",
"image_url": null,
"url": "https://www.facebook.com/reel/100000000000201/",
"caption": null,
"album_images": [],
"details": {}
}
],
"shared_post": null
}
],
"events": [
{
"id": "100000000000004",
"type": "Event",
"name": "Community Garden Day",
"url": "https://www.facebook.com/events/100000000000004/",
"profile_picture_url": null,
"is_verified": null,
"summary": "12 people going · Community Gardens",
"subtitle": "SAT AT 10:00 +01",
"description_snippets": [],
"join_state": null,
"has_membership_questions": null
}
],
"marketplace": [
{
"id": "100000000000005",
"title": "Garden planter",
"url": "https://www.facebook.com/marketplace/item/100000000000005/",
"created_at": 1790812800,
"price": {
"formatted_amount": "€25",
"amount": "25.00"
},
"image": null,
"location": {
"reverse_geocode": {
"city": "Berlin",
"state": "BE"
}
},
"seller": {
"__typename": "User",
"id": "100000000000001",
"name": "Community Updates"
},
"is_sold": false,
"is_pending": false,
"delivery_types": [
"IN_PERSON"
]
}
],
"results": [
{
"role": "TOP_PUBLIC_POSTS",
"type": "SearchRichPostRenderingStrategy",
"data": {
"__typename": "SearchRichPostRenderingStrategy",
"view_model": {
"click_model": {
"story": {
"post_id": "100000000000101"
}
}
}
}
}
],
"pagination": {
"has_next_page": true,
"cursor": "<opaque cursor>"
}
}
}03
Fields
Responses include cost, created_at, request_duration and parse_duration alongside data. Missing optional fields are null.
data.posts []
Dedicated video results, including Reels, appear in data.videos with the same fields as posts. Ordinary posts with video attachments stay in data.posts. Each video costs 4 credits.
data.videos []
data.users []
data.pages []
data.groups []
Event dates and times are kept as Facebook's displayed text in subtitle.
data.events []
data.marketplace []
data.results []
data.pagination {}