Search with xAI

xai

xAI searches live posts on X, and the web.

Features2
Modes2
Filters2

Playground

Pinned to xAI.

Results from xAI

    Features

    xAI delivers 2 of the features on the feature list, each from one or more of its modes.

    FeatureReturns
    Web search (general)Ranked pages from the open web that match a query, each with a passage.
    Social postsRecent public posts on a subject, or an account's latest posts, from social platforms.

    Modes

    xAI has 2 search modes. Choose which of them a search may use under Routing on your account page.

    • Default search
    • Web

    Filters xAI applies

    Set them under filters. A filter a provider can’t apply returns 400 unsupported_filter.

    FilterKeeps
    domainsOnly these sites, or with "mode": "exclude", none of them.
    recencyThe last so many days, or a range of dates.
    request.jsonJSON
    {
      "query": "which language has the most native speakers",
      "top_k": 5,
      "requested_provider": "xai",
      "filters": {
        "domains": { "values": ["en.wikipedia.org"] }
      }
    }

    Pin a query to xAI

    1. Over the HTTP API, send "requested_provider": "xai" with the query and your search key.
    2. In an agent connected over MCP, ask it to search with xAI.

    Results come back in the same shape for every provider, as the docs describe. Leave the field out, and Grounder routes each query to the provider most likely to answer it well.

    search.shShell
    curl https://api.grounder.net/v1/search \
      -H "Authorization: Bearer $GROUNDER_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "query": "which language has the most native speakers",
        "top_k": 5,
        "requested_provider": "xai"
      }'