Facebook / Search
Search Groups
Search Facebook's Groups tab. Each returned group costs 4 credits.
01
Request
POST /facebook/search/groups with a bearer API key. Each call returns one page.
| query | Required search text, such as gardening. |
| city | Optional numeric Facebook city ID. Baltimore, Maryland is 112438218775062. Omit to search all cities. |
| public | Optional boolean. True restricts results to public groups; false or omitted leaves visibility unrestricted. |
| cursor | Omit or send null initially. Pass data.pagination.cursor unchanged to fetch the next page. |
▸ ▾ request {}
{"query":"buy and sell","city":"112438218775062","public":true}With public off, both public and private groups can appear.
When data.pagination.has_next_page is true, send data.pagination.cursor as cursor with the same query and filters. Pass it back unchanged. Page lengths vary; stop when there is no next page.
Each returned group costs 4 credits. 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 group; native card shortened
{
"cost": 4,
"created_at": 1790850788,
"request_duration": 310,
"parse_duration": 1,
"data": {
"groups": [
{
"id": "123456789000001",
"name": "Community Gardening",
"url": "https://www.facebook.com/groups/123456789000001/",
"profile_picture": {
"uri": "https://scontent.example.com/group.jpg",
"width": 60,
"height": 60,
"scale": 1
},
"privacy": "Public",
"members": "1.1K members",
"activity": "3 posts a day",
"description_snippets": [],
"join_state": "CAN_JOIN",
"has_membership_questions": false
}
],
"results": [
{
"role": "ENTITY_GROUPS",
"type": "XFBSearchListCellProfileRenderingStrategy",
"data": {
"__typename": "XFBSearchListCellProfileRenderingStrategy",
"view_model": {
"profile": {
"__typename": "Group",
"id": "123456789000001",
"name": "Community Gardening",
"url": "https://www.facebook.com/groups/123456789000001/",
"profile_picture": {
"uri": "https://scontent.example.com/group.jpg",
"width": 60,
"height": 60,
"scale": 1
}
},
"primary_snippet_text_with_entities": {
"text": "Public · 1.1K members · 3 posts a day"
},
"description_snippets_text_with_entities": [],
"ctas": {
"primary": [
{
"profile": {
"viewer_join_state": "CAN_JOIN",
"has_membership_questions": false
}
}
]
}
}
}
}
],
"pagination": {
"has_next_page": false,
"cursor": null
}
}
}03
Fields
Responses include cost, created_at, request_duration and parse_duration alongside data.
privacy, members and activity are separate fields. Membership and activity preserve Facebook's displayed rounding and units; missing parts are null.
data.groups []
▸ ▾ profile_pictureobjectProfile picture, or null when absent.
data.results []
data.pagination {}