/api/v1/x/search
Adaptive, high-reasoning Grok 4.5 research over X
Research X with a high-reasoning xAI Grok 4.5 agent that runs multiple targeted searches, inspects the evidence, and refines or broadens later searches within a hard three-turn ceiling. The default and maximum window is 365 days. Results may include substantive original posts, replies, quote posts, and thread entries; only content-free promotion/spam, engagement bait, duplicates, and broad-topic matches without evidentiary value are excluded. The response returns citation-grounded posts, accounts, optional Quotient market context, and Quotient expert metadata. Results are not persisted by Quotient and provider storage is disabled. A request whose X Search does not execute or does not complete the required multi-search research returns 502 upstream_search_unavailable; candidate posts that all fail citation grounding return 502 upstream_grounding_failed. These failures are not billed. A 200 with meta.result_count 0 therefore means the search ran and genuinely found no candidate posts.
Parameters
None.
Request body
application/json, required
| Field | Type | Description |
|---|---|---|
| query required | string | Minimum length: 1; Maximum length: 4000 |
| market_slugs | string[] | Optional cached Quotient markets to pair with X results. Maximum items: 10 |
| from_date | string | Inclusive YYYY-MM-DD. Defaults to 365 days before to_date; the maximum span is 365 days. Format: date |
| to_date | string | Inclusive YYYY-MM-DD. Defaults to today; from_date still must be no more than 365 days earlier. Format: date |
| allowed_x_handles | string[] | Optional provider-enforced account allowlist. Maximum items: 20 |
| limit | integer | Default: 8; Minimum: 1; Maximum: 15 |
Responses
200: Structured, citation-grounded X results
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| query | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| summary | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| posts | XSearchPost[] | posts fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| accounts | object[] | accounts fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| quotient_markets | QuotientMarketContext[] | quotient_markets fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gaps | string[] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| citations | string[] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| meta | object |
401: Unauthorized
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
402: Payment Required
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
403: Insufficient credits for the requested route
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
422: Invalid request body
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
429: The caller exceeded a per-second, per-minute, daily, or concurrency limit. No credits are debited and no x402 payment is settled for this response.
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
502: xAI unavailable (upstream_unavailable), X Search did not execute or complete the required multi-search research (upstream_search_unavailable), or candidate posts all failed citation grounding (upstream_grounding_failed). Not billed.
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
503: X search is not configured
| Field | Type | Description |
|---|---|---|
| error required | string | Error code |
| message required | string | Human-readable message |
| retry_after | integer | Seconds to wait (only on 429) |
| retryAfter | integer | Seconds to wait for owner-scoped forecast-request quota errors. |
| limit_scope | string | Quota scope that rejected the request, such as standard or x_research. |
| quotaScope | string | Stable forecast-request quota scope, such as venue_market_daily. |
| limit | integer | Configured bound for the forecast-request quota that was exceeded. |
Set QUOTIENT_API_KEY in your shell and replace example identifiers with returned IDs before running a request.
curl --request POST \
--header "x-quotient-api-key: $QUOTIENT_API_KEY" \
--header "content-type: application/json" \
--data '{"query":"What evidence is changing the odds of a 2026 Ukraine ceasefire?","market_slugs":["russia-x-ukraine-ceasefire-in-2026"],"limit":15}' \
'https://quotient-api-gateway.onrender.com/api/v1/x/search'{
"query": "example",
"summary": "example",
"posts": [
{
"post_id": "example",
"url": "example",
"author_handle": "example",
"author_name": "example",
"published_at": "2027-01-01T00:00:00Z",
"text": "example",
"relevant_excerpt": "example",
"relevance": "example",
"stance": "supports_yes",
"linked_market_slugs": [
"example"
],
"author_metadata": {
"handle": "example",
"display_name": "example",
"x_user_id": "example",
"current_username": "example",
"is_quotient_expert": false,
"quotient_expert": {
"designation": "reviewed_expert",
"policy_version": "example"
}
}
}
],
"accounts": [
{
"handle": "example",
"display_name": "example",
"description": "example",
"profile_url": "example",
"quotient_metadata": {
"handle": "example",
"display_name": "example",
"x_user_id": "example",
"current_username": "example",
"is_quotient_expert": false,
"quotient_expert": {
"designation": "reviewed_expert",
"policy_version": "example"
}
}
}
],
"quotient_markets": [
{
"venue": "polymarket",
"nativeMarketId": "example",
"nativeEventId": "example",
"seriesTicker": "example",
"marketKey": "example",
"quotientMarketId": "example",
"slug": "example",
"marketUrl": "example",
"sourceUrl": "example",
"broker_channels": [
"robinhood"
],
"robinhood_category": "example",
"robinhood_url": "example",
"market_id": "example",
"question": "example",
"resolution_criteria": "example",
"resolution_source": "example",
"end_date": "2027-01-01T00:00:00Z",
"condition_id": "example",
"status": "open",
"resolved_yes": false,
"venue_data": {
"yes_odds": 0,
"volume_24h": 0
},
"quotient_url": "example",
"forecast": {
"venue": "polymarket",
"market": {
"venue": "polymarket",
"nativeMarketId": "example",
"nativeEventId": "example",
"seriesTicker": "example",
"marketKey": "example",
"quotientMarketId": "example",
"slug": "example",
"marketUrl": "example",
"sourceUrl": "example",
"broker_channels": [
"robinhood"
],
"robinhood_category": "example",
"robinhood_url": "example"
},
"id": "example",
"probability": 0,
"created_at": "2027-01-01T00:00:00Z",
"headline": "example",
"thesis": "example",
"resolution_pathway": {
"criteria": "example",
"crux": "example",
"deadline": "2027-01-01T00:00:00Z",
"source": "example"
},
"delta_from_prior": 0,
"delta_reasoning": "example",
"refresh_reason": "example",
"relationships": {
"assets": [
{}
],
"markets": [
{}
],
"signals": [
{}
],
"truncated": {
"assets": false,
"markets": false,
"signals": false
}
}
},
"relationships": {
"assets": [
{
"relationship": null,
"direction": null,
"via": null,
"id": null,
"assetKey": null,
"name": null,
"ticker": null,
"asset_type": null
}
],
"markets": [
{
"relationship": null,
"direction": null,
"via": null,
"marketKey": null,
"venue": null,
"nativeMarketId": null,
"question": null
}
],
"signals": [
{
"relationship": null,
"direction": null,
"via": null,
"id": null,
"signal_type": null,
"canonical_endpoint": null,
"side": null,
"published_at": null
}
],
"truncated": {
"assets": false,
"markets": false,
"signals": false
}
}
}
],
"gaps": [
"example"
],
"citations": [
"example"
],
"meta": {}
}