How Grok finds sources
Grok is a family of large language models developed by SpaceX Super Intelligence and first launched in November 2023, with apps for iOS and Android and integration into the X social network.[1] Beyond the text it learned during pretraining, Grok can reach current information through tool calling: the xAI API offers built-in, server-side tools including Web Search and X Search that let the model search the internet, browse pages, and query posts on X.[2][3] The API returns source URLs for information gathered through those tools, and developers can restrict or exclude specific domains.[2][3]
Overview
Grok is a series of generative AI large language models developed by SpaceX Super Intelligence, launched in November 2023 and integrated with the X social network and with Tesla's Optimus robot.[1] Successive versions added capabilities including image generation, web search, a "Think" mode that simulates reasoning, an agentic coding tool, and AI teammates.[1] Grok received search engine capabilities on November 16, 2024.[1]
Two distinct mechanisms shape what Grok can say about an organization. The first is what the model absorbed during pretraining: xAI described Grok 3 as blending strong reasoning with "extensive pretraining knowledge".[4] The second is retrieval at answer time, where the model calls a search tool and reads results before writing.[2] The distinction between these two paths is covered in parametric knowledge vs. retrieved context and in grounding and web search tools, and it matters because only the retrieval path can surface pages published after training ended, a limitation discussed under knowledge cutoffs.
Wikipedia reports that Musk acknowledged in 2026 that Grok was partially distilled from OpenAI's GPT models, and that Grok also generates articles for the encyclopedia website Grokipedia, launched in October 2025.[1] Background on how pretraining corpora are assembled in general is covered in training data and web corpora.
Web Search and X Search tools
The xAI API supports tool calling, which enables Grok to perform actions beyond generating text, such as searching the web, executing code, querying data, or calling custom functions.[2] The documentation divides tools into two categories: built-in tools that run server-side and execute automatically, and function calling, where developers define their own tools that the model can request.[2] The built-in set listed in the documentation includes Web Search, X Search, Code Interpreter, Image Generation, and Collections Search.[2]
The Web Search tool "enables Grok to search the web in real-time and browse web pages to find information", allowing the model to search the internet, access web pages, and extract relevant information to answer queries with up-to-date content.[3] It is exposed as web_search in the xAI SDK and the OpenAI Responses API, and as xai.tools.webSearch() in the Vercel AI SDK, and is supported in all Responses API compatible SDKs.[3] X Search is documented separately as a tool to "Search X posts, users, and threads", and the quick-start examples show web_search, x_search, and code execution enabled together in a single request.[2]
The documented control loop is iterative: the API analyzes the query, decides whether to make a tool call or give a final answer, executes built-in tools or returns a tool call request, processes results, and continues until sufficient information is gathered before returning the final response with citations where applicable.[2] That pattern is a form of retrieval-augmented generation, and because fetching happens at request time rather than through bulk collection, it differs from the access patterns catalogued in the AI crawler and fetcher reference.
Search parameters and citations
The Web Search tool documents four parameters[3] :
| Parameter | Description |
|---|---|
| allowed_domains | Only search within specific domains (max 5)[3] |
| excluded_domains | Exclude specific domains from search (max 5)[3] |
| enable_image_understanding | Enable analysis of images found during browsing[3] |
| enable_image_search | Enable image search results that can be embedded in responses[3] |
Setting allowed_domains makes the web search perform both searching and web browsing only on pages that fall within the specified domains, and it cannot be set together with excluded_domains in the same request.[3] Excluded_domains prevents the model from including the specified domains in any web search tool invocation.[3] The documentation's worked examples use grokipedia.com as the domain being allowed or excluded.[3]
Enabling image understanding equips the agent with a view_image tool so it can analyze images encountered during the search process, and usage appears as SERVER_SIDE_TOOL_VIEW_IMAGE in response.server_side_tool_usage; enabling it for Web Search also enables image understanding for X Search when that tool is included in the request.[3] Image search lets Grok find relevant images and include them in the response as Markdown image embeds, with the returned images added to the model context used to write the response; the Vercel AI SDK does not yet expose enableImageSearch.[3]
On attribution, the documentation states that the API "automatically returns source URLs for information gathered via tools".[2] In the xAI SDK the examples print response.citations; in the Vercel AI SDK, generateText returns a sources value alongside the text; and in streaming mode, parts of type source with sourceType url carry a citation URL.[3][2] Tool requests are priced on two components, token usage and tool invocations, so costs scale as the model calls more tools for a complex query.[2] Because the model decides at runtime how many searches to run, the same prompt can follow different retrieval paths, a phenomenon discussed in why LLM answers vary, and the returned source URLs are the raw material for measuring LLM visibility.
DeepSearch in the Grok app
The sources available here document Grok's retrieval behavior mainly at the API level and do not describe a consumer feature named DeepSearch, its interface, or its result selection, so no specifics can be stated about it. What is documented on the product side is that Grok has apps for iOS and Android and is integrated with X, that it received search engine capabilities on November 16, 2024, and that standalone web and iOS apps were released in December 2024 before becoming available worldwide on January 9, 2025.[1] xAI also describes a "Think" button that exposes extended reasoning, with the model spending anywhere from a few seconds to several minutes considering multiple approaches and verifying its own solution.[4]
Whether the consumer apps call the same server-side Web Search and X Search tools described in the developer documentation, and with which parameters, is not stated in these sources.[3][2] Differences of this kind between interfaces are discussed in API answers vs. app answers and, for account-level context, in memory, location and personalization.
What is not publicly documented
The documentation describes the parameters a developer can set and the citations returned, but it does not publish the underlying index, the ranking method used to choose which pages are searched or browsed, how many results are retrieved per query, or how retrieved passages are weighted when the answer is composed.[3][2] It also does not specify how often indexed content is refreshed, or how the model chooses between web results and posts on X when both tools are enabled.[2] Ordering effects within long retrieved contexts are a general research topic covered under position bias and "lost in the middle", not an xAI-documented behavior.
Because retrieval is a tool the model may or may not invoke on any given turn, an answer can rest on pretraining knowledge alone.[2][4] For brands, the practical consequences of thin or absent retrieval are discussed in long-tail knowledge and small brands and LLM hallucinations about brands, while comparable retrieval designs in other assistants are described in how ChatGPT finds and cites sources and how Perplexity finds and cites sources.
Common questions
Can Grok search the web?
Yes. The xAI Web Search tool "enables Grok to search the web in real-time and browse web pages to find information", including accessing pages and extracting relevant information to answer queries with up-to-date content.[3] In the product, Wikipedia records that Grok received search engine capabilities on November 16, 2024.[1] Whether a search runs on a given request depends on the model deciding that a tool call is needed.[2]
Does Grok use posts on X as sources?
The xAI API lists X Search among its built-in, server-side tools, described as a way to search X posts, users, and threads.[2] The quick-start examples show x_search enabled alongside web_search and code execution in the same request.[2] How the model weighs posts on X against web pages when both tools are available is not specified in the documentation.[2]
How does the xAI API return citations?
The documentation states that the API automatically returns source URLs for information gathered via tools, and that the final response is returned with citations where applicable.[2] In the xAI SDK the examples read response.citations, the Vercel AI SDK returns a sources value from generateText, and streaming responses emit parts of type source with a url.[3][2] A dedicated Citations page in the documentation is referenced for further detail.[3]
Can developers limit which sites Grok searches?
Yes. The allowed_domains parameter restricts both searching and web browsing to pages within the specified domains, with a maximum of five, while excluded_domains prevents the model from including the listed domains in any web search tool invocation, also capped at five.[3] The two filters cannot be set together in the same request.[3]
Can Grok look at images it finds while browsing?
Setting enable_image_understanding to true gives the agent access to a view_image tool so it can analyze images encountered during the search process, with usage reported as SERVER_SIDE_TOOL_VIEW_IMAGE.[3] A separate parameter, enable_image_search, lets Grok search for relevant images and embed them in the response as Markdown image embeds, with the returned images added to the model context used to write the answer.[3]
See also
- Grounding and web search tools
- How ChatGPT finds and cites sources
- How Claude finds and cites sources
- How Gemini finds and cites sources
- How Perplexity finds and cites sources
- How Microsoft Copilot finds sources
References
- ^ a b c d e f g h i j "Grok (chatbot)". Wikipedia. Retrieved November 2026.
- ^ a b c d e f g h i j k l m n o p q r s t u v w x y "Tools overview". xAI documentation. Retrieved November 2026.
- ^ a b c d e f g h i j k l m n o p q r s t u v w x y z "Web Search tool". xAI documentation. Retrieved November 2026.
- ^ a b c "Grok 3 Beta: The Age of Reasoning Agents". xAI. Retrieved November 2026.