# Facebook Search Groups API (https://www.socialcrawl.dev/platforms/facebook/search-groups) > Finds public Facebook groups by keyword, so you can pick the groups to read before calling `/v1/facebook/group/posts`. Returns one row per group, in the order the search found them, on the same Author shape `/v1/facebook/group` returns: `author.id` is the group's key (its numeric id, or the vanity name of a group that set one), `author.url` is the canonical `https://www.facebook.com/groups//` form that `/v1/facebook/group/posts` and `/v1/facebook/group` take as `url` with no re-mapping, and `author.display_name` is the group's name. Groups are discovered through a public web search index limited to Facebook group pages, so a group is found either through its own page or through a post inside it: `author.ext.search_hit.match` says which (`group_page` or `post_in_group`), and `author.ext.search_hit` also carries the hit's `title`, `snippet` and `evidence_url` (the exact page that matched). A group found only through a post has `display_name: null`, because a post's title is not the group's name. The search hit carries no member count, description, privacy or creation date, so on a plain call `author.followers`, `author.bio`, `author.joined_at` and `author.ext.group` are null. Send `include=details` and every group is joined, in the same call, to the group lookup: the member count, the description, the creation date, the privacy and visibility labels, the posting activity (`author.ext.group.activity`), the numeric id (`author.ext.group.id`) and, where it was null, the name land on each row. Cost: 1 credit for the page plus 1 credit per group whose member count, description or activity was filled from a fresh lookup (at most 10 groups a page, so 11 credits at most); groups already in cache are free, groups that could not be filled are refunded, and a repeat of the same call within the cache window is 0 credits. Time: a plain page takes about 2 to 5 seconds; `include=details` adds 3 to 7 seconds on a fresh page (the lookups run in parallel and the call waits for the slowest, never more than 12 seconds) and nothing when the groups are already cached. The response carries a `hydration` block itemising rows, lookups, cache hits, credits and milliseconds. Every row also carries `computed.relevance` against your query, free, and `relevance=filter` drops the groups that are not about it. A page holds up to 10 groups, fewer when several hits belong to one group. Forward `pagination.next_cursor` as `cursor` for the next page. The same group can appear again on a later page, and once under its vanity name and once under its numeric id, so dedupe on `author.ext.group.id` after `include=details` when that matters. A group can be public in the search and still private to read: check `author.ext.group.privacy_label` before calling `group/posts`. TL;DR: `GET /v1/facebook/search/groups` costs 1 credit for the page. include=details holds 1 credit per group (at most 10 a page) and keeps only the groups filled from a fresh lookup, so a page is at most 11 credits; groups served from cache are free, unfilled groups are refunded, and a repeat of the same call within the cache window costs 0. Relevance against your query (by default, or with relevance=) is free. Adding relevant_to= holds 4 extra credits and refunds down to 1 credit per started 25 rows that were newly judged: rows already judged for the same topic are free, a page where nothing could be judged refunds the whole extra, and a cached page is free. With `max_pages`, `max_items` or `max_credits`, each page walked is billed at this price (a cached page is free), and `max_credits` caps the total. and returns SocialCrawl's unified JSON schema. Single x-api-key auth, 100 free credits on signup. ## Parameters | Parameter | Required | Description | | --- | --- | --- | | `query` | yes | Keywords describing the groups to find, for example `vintage cars`. Keywords only: the search is already limited to public Facebook groups, so a `site:` operator is refused before billing. | | `page` | no | Page number, starting at 1. Forwarding `pagination.next_cursor` as `cursor` does the same. | | `include` | no | Set to `details` (one token only) to fill, on every group in this one call, `author.followers` (members), `author.bio` (the description), `author.joined_at`, `author.ext.group.privacy_label`, `visibility_label`, `activity` and `id` (the numeric group id), and the name where it was null. Holds 1 credit per group (at most 10 a page) and keeps only the groups whose member count, description or activity was filled from a fresh lookup; groups already in cache and groups the lookup cannot fill are refunded, so a page is never more than 11 credits. The join takes 3 to 7 seconds on a fresh page, never more than 12, and nothing when the groups are already cached; read `data.hydration` for the rows, the credits held and kept, and the time. Without it the call is unchanged. (details) | | `relevance` | no | Optional. Without this param every row already carries computed.relevance against your query, free ({ p, sense, depth, spam }: is this row about what your query means, or a different thing that shares its words?), and nothing is dropped or reordered. score asks for it explicitly and waits for every row; filter also drops the rows that are not about your query, and lists their ids in data.relevance.dropped_ids. Your query is the topic; nothing to configure. A row that could not be judged is never dropped and carries relevance: null. Pagination is unchanged, so a filtered page can hold fewer rows. Free with your query as the topic; with relevant_to it adds 1 credit per started 25 newly judged rows (rows already judged for the same topic are free, and so is a cached page). (score \| filter) | | `relevance_threshold` | no | Optional, only with relevance. The probability (0 to 1) a row must reach to be kept by relevance=filter. Default 0.5. Lower keeps more rows, higher keeps fewer. | | `relevant_to` | no | Optional, only with relevance. Up to 200 characters describing what you mean, used as the topic instead of the query. Use it when the query is ambiguous, for example query=cleopatra with relevant_to=Cleopatra, the IGT slot game. | | `judgments` | no | Optional, on (the default) or off. By default every row gains free SocialCrawl judgments (computed.labels, and computed.relevance on search endpoints), reported in data.labels (mode default) and data.relevance (origin default), each with a status (complete, partial or skipped) and pending: the rows still being judged when the page was sent, which carry null now and are filled on your next call or cached read. Default judgments never add credits, never change an existing field, and never drop or reorder a row. off returns the page exactly as before, with none of those keys. label=none does the same. (on \| off) | | `dry_run` | no | Optional. When 1, return a cost preview for this labelled or relevance-filtered request without fetching the page or judging any row. data.estimate reports rows_expected, rows_cached, label_credits_min, label_credits_max and base_credits. 0 credits charged. (1) | | `fit` | no | Optional. When goal, keep the rows and fields needed for the goal you pass in goal= (plus any that are uncertain, and the first and last), and replace the rest with a stub. data.held_back lists the held ids and a recall id that re-reads the full page from cache at no extra charge. Without this param the page is unchanged. (goal) | | `goal` | no | Required by fit=goal. What you are trying to do, in your own words, up to 300 characters. | | `fit_tokens` | no | Optional, only with fit=goal. Soft cap on how much of the page to keep, in tokens. Uncertain blocks and the first and last block are kept even if they exceed it. | | `max_pages` | no | 1 to 50 (default 1, or 50 when `max_items` or `max_credits` is sent). Walk up to this many pages in one call and return the rows from all of them. Each page walked is billed exactly as one call to this endpoint (a cached page is free) and counts against your rate limit; its charge and any refund are recorded under the page's own request id, listed in `data.walk.request_ids`. The walk stops early at the last page, or when the request's time budget runs low; `data.walk.stopped` says why (`end`, `max_pages`, `max_items`, `max_credits`, `time_budget`, `page_error`) and `pagination.next_cursor` continues from where it stopped. | | `max_items` | no | 1 to 5000. Get more in one call: keep walking pages until the response holds at least this many rows, then stop with `data.walk.stopped: "max_items"`. The last page is returned whole (it was billed), so `data.items` can hold up to one page more than this, and `pagination.next_cursor` resumes right after it without skipping a row. Walks up to 50 pages unless `max_pages` says fewer; each page is billed as one call (a cached page is free). Add `max_credits` to cap the spend. A long walk can stop on the time budget first (`"time_budget"`): send the returned cursor with the same params to continue. | | `max_credits` | no | 1 to 100000. The most this call may spend, across every page it walks. A page starts only while the credits already spent plus that page's price (or, when higher, the most any page of this walk has cost) still fit, so the call never goes past it; the walk then stops with `data.walk.stopped: "max_credits"` and the cursor to resume. Sent alone, it walks as far as the budget goes (up to 50 pages). A value below the price of one page is a free 400 whose `error.details.page_credits` names that price. Credits a row join (`include=`) adds are known only once a page has run, so page 1 is checked against its own price. | ## Code example ```bash curl -G "https://www.socialcrawl.dev/v1/facebook/search/groups" \ --data-urlencode "query=vintage cars" \ -H "x-api-key: sc_YOUR_API_KEY" ``` ## FAQ ### What does the Facebook Search Groups API return? Returns public Facebook groups matching a keyword, each with the group key, page URL, and whether the hit was the group page or a post inside it. The response uses the same JSON envelope as every SocialCrawl endpoint, with the data, credits_used and request_id fields. ### When should I use the Facebook Search Groups endpoint? Use it to find groups before facebook/group. include=details fills members and privacy, one credit per group filled. ### How much does the Facebook Search Groups API cost? The price depends on the request, from 1 to 15 credits per call. Every new account gets 100 free credits. Credits for failed or empty calls are refunded automatically, and there is no subscription. ### What parameters does the Facebook Search Groups API need? The one required parameter is query (keywords describing the groups to find, for example vintage cars). It also accepts 13 optional parameters, all listed on this page. The optional parameter to try first is relevance (Drops rows that are not about your query, at no extra credits; relevance=score keeps them and adds a score). ### How do I call the Facebook Search Groups API? Send a GET request to https://www.socialcrawl.dev/v1/facebook/search/groups?query=vintage%20cars with your API key in the x-api-key header. An Authorization: Bearer header works too. See the full Facebook API: https://www.socialcrawl.dev/platforms/facebook ## Pricing - Standard endpoints: 1 credit per call - Advanced endpoints: 5 credits per call - Premium endpoints: 10 credits per call - 100 free credits on signup, no credit card required. Cached responses cost 0 credits. Credit packs never expire. - Full pricing: https://www.socialcrawl.dev/pricing ## Explore with AI Questions this API answers, phrased for an AI assistant: - What does the SocialCrawl Facebook Search Groups API return? - How do I get Facebook Search Groups data with the SocialCrawl API?