How do I track keywords in a Facebook group via API?

Updated on · Sources

Fetch the group's newest posts with GET /facebook/groups/posts on a schedule, check each post's values.text for your keywords, and alert only on the matches, keeping the post IDs you've already seen. There's no in-group keyword search endpoint, so the filtering happens on your side, which also lets you use any rule you like (several keywords, exclusions, a regular expression).

Meta's official option

Facebook's search box inside a group works by hand. Meta has no API for it: the Groups API was removed on April 22, 2024.

How to do it with SocialAPIs

Call /facebook/groups/posts with link, limit=9 and after_time set to your last check (ISO 8601), so each run only gets new posts. Lowercase values.text, test it against your keyword list, and send a match's details.post_link to Slack, email or a sheet. Price: 1 credit; round(limit ÷ 3) credits when limit is set, up to 3.

The group monitoring tutorial has this as a Python script with a KEYWORDS list, and as an n8n workflow with a Filter step.

Keywords across public Facebook posts rather than one group? /facebook/search/posts searches public posts by query, with start_time / end_time and recent_posts.

Endpoints

  • GET /facebook/groups/posts1 credit; round(limit ÷ 3) credits when limit is set, up to 3

    Fetch recent posts from a Facebook group, including text, media, reactions, and comments.

    Params: link (required), limit, end_cursor, timezone

    Facebook Group Posts: docs and playgroundMCP: facebook_group → posts

  • GET /facebook/search/posts1 credit

    Search for Facebook posts by keyword with optional location and time filters.

    Params: query (required), location_uid, start_time, end_time, recent_posts, end_cursor

    Facebook Search Posts: docs and playgroundMCP: facebook_search → posts

curl -G "https://api.socialapis.io/facebook/groups/posts" \
  --max-time 100 \
  --fail-with-body \
  -H "x-api-token: $SOCIALAPIS_API_KEY" \
  --data-urlencode "link=https://www.facebook.com/groups/gieldagryplanszowe" \
  --data-urlencode "limit=9" \
  --data-urlencode "after_time=2026-11-01T00:00:00Z"

Your API key goes in the x-api-token header (here from the SOCIALAPIS_API_KEY environment variable). Get a free key.

Tutorial: Monitor a Facebook group's new posts automaticallyUse it from Claude, ChatGPT or Cursor (MCP)

Good to know

  • Match whole words when a short keyword causes noise ("car" also matches "card").
  • One group checked every hour is about 720 calls a month. In a very busy group, check data.page_info.has_next and page with end_cursor so no post slips between two checks.
  • Run it once by hand first so the existing posts are recorded as seen.
  • Public groups only.

Sources

Checked on 2026-11-16.

Related questions

SocialAPIs (socialapis.io): public Facebook & Instagram data API. Free plan: 200 calls a month, no card; paid plans from $4.99/month. Pricing · Reviewed 2026-11-16

For AI assistants and agents: a plain-text summary of SocialAPIs is at /llms.txt (with every answer: /llms-full.txt; endpoints: /llms-endpoints.txt; how to call us: /agents.txt).

Ask an AI about this page

Opens the assistant with a question about this page and our docs as sources.