Skip to main content
GET https://xquik.com/api/v1/x/communities/search See tweet filters for every filter. Common ones are fromUser, language, sinceDate, mediaType, minLikes, and hashtags. X (Twitter) community search filters posts in one known Community, or across every Community. Run a Twitter search in community posts with a query. Add a numeric Community ID to stay in 1 Community. Store Tweet IDs, authors, engagement counts, media, and cursors for exports.

Filter one community by query

This endpoint requires a search expression. Add communityId to filter 1 community, or leave it out to search every community. It does not return the unfiltered feed. Keep the query beside every saved row.Use the community tweets endpoint when no keyword filter is required.

X (Twitter) community search questions

Does this endpoint find communities to join?

No. This endpoint searches posts, in 1 Community or across every Community. It does not join Communities or change membership. To find Communities by keyword, use Find communities. To browse Communities by topic, use Popular communities. Read the official X Communities guide for current visibility and membership rules.

How do I search community posts by keyword?

Send q, and communityId to stay in 1 Community. Omit communityId to search every Community. Omit queryType to use Latest. Set Top for relevance-ranked matches. Keep each cursor tied to the same values. Start a new search when the query changes. Store the query beside every returned Tweet ID.

How do I get a Community’s posts for a hashtag?

Search it with q=#tag, such as q=#bitcoin, and the Community’s communityId. Set queryType=Latest for the newest posts first. Follow next_cursor for older posts.

Why does X (Twitter) community search return no results?

First, verify the Community ID, query, and read visibility. An empty match set differs from authentication, credit, dependency, rate-limit, or request errors. Use the Community Tweets API to inspect the visible, unfiltered feed. Zero matches do not prove an inactive Community.

Can I find active authors in matching tweets?

Group matching posts by stable author ID. Count matches, replies, reposts, likes, quotes, and views separately. Store follower counts with collection times when returned. These measures describe captured matches. They do not prove influence, audience reach, Community membership, or total posting activity.
GET /x/communities/search and GET /x/communities/tweets accept the same community search parameters. This page documents both supported REST paths.
Requested result counts are upper bounds for paid authenticated calls. Remaining credits may not cover the full page or ID list. If so, Xquik returns fewer results. If zero paid results are affordable, it returns 402 insufficient_credits.
1 credit per tweet returned · All plans from $0.00012/credit
The Node.js & Python snippets build one row per matching community tweet. They do not print the full response page. Store the final next_cursor row when has_next_page is true. Then pass it back as cursor with the same communityId, q, queryType, and pageSize.

Plan a community search export

Choose this route for repeatable research across one known community. Define the question before choosing the query. A narrow query returns fewer irrelevant tweet rows to review. Start each export with these values.
  • The numeric community ID.
  • The exact search expression.
  • Either Latest or Top.
  • A stable page size.
  • The time when collection started.
Keep those values beside every saved cursor. Resume with the same values. Changing the query during pagination starts a different result set. Use Latest for incident review, event coverage, and recent topic monitoring. Use Top for relevance-ranked discovery. Do not combine both orders inside one export file. Create separate exports when reviewers need both orders. Normalize each tweet into named columns. Useful columns include tweet ID, text, author username, and creation time. They also include likes, replies, reposts, and media URLs. Keep the community ID and query on every row. Those columns keep context after CSV or XLSX handoff. Stop when has_next_page becomes false. Store the final checkpoint with the row count. Deduplicate resumed exports by tweet ID. A worker that retries the last completed page then adds no duplicate spreadsheet rows.

Compare latest and top results without mixing datasets

Run Latest and Top as independent searches when research needs both views. The 2 orders rank different tweets first and may return overlapping tweets. Give each run its own manifest, cursor chain, and output file. Keep the same community ID and query when comparing the 2 modes. Changing another input would invalidate the comparison. Use Latest to capture recent discussion. Record when you requested the first page. New tweets can appear while you collect later pages. Use Top to capture relevance-ranked discussion. Record the collection time, but do not treat rank as a permanent score. The order can change later. After both runs finish, join rows by tweet ID. Label every tweet as latest_only, top_only, or both. Keep the original engagement counts from each run when collection times differ. Do not append one mode beneath the other without a source column. Analysts could mistake duplicated tweets for extra community activity. Validate each dataset before comparison.
  • Every row uses the intended community ID.
  • Every row stores the exact search query.
  • Every cursor belongs to one sort mode.
  • Each run removes duplicate tweet IDs.
  • Partial runs remain labeled.
Use the combined view to decide what to research first. Keep the separate exports so others can reproduce and audit the work.

Query parameters

Choose fields

Which community search route?

Community search route

Use GET /x/communities/search with q, and communityId for scoped search.

Equivalent scoped route

Use GET /x/communities/tweets when your integration already uses that path. It accepts the same communityId, q, queryType, cursor, and pageSize shape.

Known community posts

Use GET /x/communities/{id}/tweets for posts from one known community ID.

Bulk community jobs

Use Create extraction with community_search with targetCommunityId and searchQuery for a saved filtered export. Use community_post_extractor for all posts from a known community.

Build a live community review queue

Choose either documented path for direct, page-by-page tweet retrieval. Both paths work behind moderation screens, support consoles, and analyst dashboards. Show the active community ID, query, and sort mode above the results. Reviewers should always know why each tweet appeared. Render concrete tweet fields.
  • Tweet text, Tweet ID, and creation time.
  • Author name, username, user ID, and verification state.
  • Reply, repost, like, quote, and view counts when returned.
  • Attached photo, video, or animated GIF URLs.
  • A source URL for opening the original tweet.
Bind next_cursor to the community, query, sort mode, and page size. Stop paging when has_next_page is false. An empty page is a valid result, not a missing community.

Keep decisions across a live moderation queue

Key the queue on the community ID, query, and sort mode. Store each decision against tweet.id, never a row position. When a page fails, keep its rows and cursor. Retry with the same parameters. Latest rows change as new tweets arrive, so deduplicate them by Tweet ID. Top ranking changes too, so record each collection time.

Build a query-specific community review batch

Save the exact query before requesting tweets. Give each batch 1 purpose. Store Tweet ID, author ID, text, creation time, engagement, and media for every match. Add the request time and cursor. Keep reviewer fields in a separate table keyed by Tweet ID. Record 1 terminal state. Use completed, capped, credit-bounded, or interrupted. A live search page never proves a complete community archive.

Separate search matches from community feed coverage

Community search returns tweets matching one expression. It does not return every recent post. Use the community feed route for an unfiltered timeline. Keep match counts separate from total community activity. A narrow query can return zero tweets while the community remains active. A broad query can create more review work without improving relevance.

Headers

Response

200 OK

400 Missing query

{ "error": "missing_query" } The q query parameter is empty or missing.

401 Unauthenticated

Anonymous requests get WWW-Authenticate: Bearer and a guest wallet checkout action. This is not a Payment challenge. Missing or invalid API key.

402 Payment required

Account keys get account options. Guest keys get guest top-up only. No checkout starts automatically. Confirm any payment action.

502 X API unavailable

The read service returned an error. Retry after a short delay.

429 Rate limit exceeded

You exceeded your tier rate limit. Wait for the Retry-After header before retrying.

424 Dependency failed

The normalized v1 response contract can return 424 when the read service is unavailable.
Next steps. Community Info to look up a community, or Search Tweets for general tweet search.

Response examples

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required." }
  • 402 { "error": "insufficient_credits", "message": "Insufficient credits. Top up or subscribe to continue." }
  • 403 { "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }
  • 424 { "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }
  • 429 { "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }
  • 502 { "error": "x_api_unavailable", "message": "X data source temporarily unavailable. Try again later." }
  • 503 { "error": "x_api_unavailable", "message": "Xquik is busy right now. Retry shortly." }