Facebook / Group

Search

Search one page of posts and matching profiles. Each returned post costs 4 credits.

01

Request

POST /api/facebook/groups/search with your bearer API key. Send the group ID and the text to search for. Each call returns one page.

group_idRequired numeric Facebook group ID.
queryRequired search text.
recentOptional boolean. Show newest results first.
location_idOptional numeric Facebook location ID.
start_dateFirst posted date, inclusive, in YYYY-MM-DD form. Send with end_date.
end_dateLast posted date, inclusive, in YYYY-MM-DD form. Send with start_date.
cursorOptional data.pagination.cursor from the previous response. Omit it for page one.

If data.pagination.has_next_page is true, send another request withdata.pagination.cursor as cursor. Pass it back unchanged. Each request fetches one page. Returned posts cost 4 credits each; matching profile cards and pages with no posts cost nothing. If the wallet cannot cover all posts in the page, the request returns 402 without results. Failed fetches are not charged.

02

Response sample

A short illustrative response. IDs, names and cursor are examples; the fields match the API response.

▸ ▾ response {} — one page, shortened
{
  "created_at": 1790414658,
  "cost": 4,
  "request_duration": 918,
  "parse_duration": 12,
  "data": {
    "posts": [
      {
        "id": "1608745650434216",
        "url": "https://www.facebook.com/groups/734678554507601/posts/1608745650434216/",
        "created_at": 1790410000,
        "text": "A post matching the search",
        "author": {
          "id": "100000000000001",
          "name": "Group member",
          "url": "https://www.facebook.com/profile.php?id=100000000000001"
        },
        "group": {
          "id": "734678554507601",
          "name": "Movies Recommendations 2026",
          "url": "https://www.facebook.com/groups/734678554507601"
        },
        "engagement": {
          "reaction_count": 3,
          "comment_count": 1,
          "share_count": 0
        },
        "media": []
      }
    ],
    "users": [
      {
        "id": "100000000000002",
        "name": "Matching member",
        "url": "https://www.facebook.com/profile.php?id=100000000000002",
        "profile_picture_url": null,
        "is_verified": false
      }
    ],
    "pagination": {
      "has_next_page": true,
      "cursor": "<opaque cursor>"
    }
  }
}

03

Fields

One result page may contain both posts and matching group-profile cards. data.users describes cards returned by this search, not a roster of the group's members.

data.posts []

idtextFacebook's post ID.
urltextLink to the post.
created_atnumberThe post's creation timestamp.
texttextThe post body, or null when the result has no message text.
▸ ▾ authorobjectThe post's author.
idtextFacebook ID of the author.
nametextName shown for the author.
urltextLink to the author's profile.
▸ ▾ groupobjectThe group containing the post.
idtextFacebook ID of the group.
nametextName of the group as shown in the result.
urltextLink to the group.
▸ ▾ engagementobjectCounts shown on the post.
reaction_countnumberReactions.
comment_countnumberComments.
share_countnumberShares.
▸ ▾ mediaobject[]Images, links and other attachments. Empty when none were parsed.
typetextThe attachment kind.
idtextFacebook ID of the attachment, when present.
image_urltextPreview or cover image URL.
urltextLink to the attachment.
captiontextCaption or title shown with it.
▸ ▾ album_imagesobject[]Images inside an album attachment.
idtextFacebook ID of the album image.
image_urltextImage URL.
urltextLink to the image.

data.users []

idtextFacebook ID of a profile card returned by this search.
nametextName shown on the card.
urltextLink to the profile.
profile_picture_urltextProfile picture URL, or null when absent.
is_verifiedbooleanWhether the card shows a verification mark.

data.pagination {}

has_next_pagebooleanWhether Facebook reported more results.
cursortextBase64URL-encoded cursor to send as cursor on the next call; null at the end.