# X Ai Search API (https://www.socialcrawl.dev/platforms/twitter/ai-search) > Natural-language search over X (Twitter) powered by xAI's Grok 4.3 model with the built-in x_search tool. Returns a synthesised answer plus X source citations. Pin results to specific authors via from_handles (or exclude with exclude_handles), and narrow to a time window with from_date / to_date. Costs 5 credits per call regardless of how many internal x_search invocations the model performs (see tool_calls_count in the response for visibility). Auto-refunds on upstream failure. Best for freeform questions like 'what is @elonmusk saying about xAI this week' that would otherwise require multiple structured calls to /v1/twitter/profile, /v1/twitter/user/tweets, etc. TL;DR: `GET /v1/twitter/ai-search` costs 5 credits per call and returns SocialCrawl's unified JSON schema. Single x-api-key auth, 100 free credits on signup. ## Parameters | Parameter | Required | Description | | --- | --- | --- | | `query` | yes | Natural-language prompt describing what you want to learn from X. The model autonomously searches X using the x_search tool with any handle / date filters you provide. | | `from_handles` | no | Comma-separated X handles (max 10). Restricts the search to posts from these accounts only. Mutually exclusive with exclude_handles. | | `exclude_handles` | no | Comma-separated X handles (max 10) to exclude from search results. Mutually exclusive with from_handles. | | `from_date` | no | ISO 8601 start date (YYYY-MM-DD). Limits the search window to posts on or after this date. | | `to_date` | no | ISO 8601 end date (YYYY-MM-DD). Limits the search window to posts on or before this date. | ## Code example ```bash curl "https://www.socialcrawl.dev/v1/twitter/ai-search?query=What%20is%20%40elonmusk%20saying%20about%20xAI%20this%20week%3F" \ -H "x-api-key: sc_YOUR_API_KEY" ``` ## FAQ ### What is the Twitter AI Search API? The Twitter AI Search API runs a natural-language query against live X (Twitter) posts using xAI's Grok model and returns a written answer grounded in the posts it read. Send a GET request to /v1/twitter/ai-search with your query — no X developer account needed. ### How is AI search different from regular tweet search? Regular search returns raw matching tweets; AI search reads across live X posts and returns a synthesized answer to your question. Use it when you want a take on what X is saying about a topic instead of a list of tweets to parse yourself. ### Can I scope the Twitter AI search to specific accounts or dates? Yes. Use from_handles to limit the search to certain accounts, exclude_handles to drop accounts, and from_date and to_date to bound the time window. Combine them to focus on a campaign, an event window, or a single creator's posts. ### Which model powers Twitter AI search? It runs on xAI's Grok, which has live access to X (Twitter). SocialCrawl routes the call for you, so you authenticate with one x-api-key instead of managing an xAI account, X API access, and billing separately. ### How much does the Twitter AI Search API cost? Each AI search costs 1 credit on the standard tier, no matter how many posts Grok reads. New accounts get 100 free credits with no credit card, so you can try a range of questions before paying anything. See the full X API: https://www.socialcrawl.dev/platforms/twitter ## 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 is the SocialCrawl Twitter AI Search API? - How to search X with AI through the SocialCrawl API