twitter

Ai Search

Returns a written answer to a plain-English question about X (Twitter), the X posts cited as sources, and how many searches the model ran.

Use it for open questions such as what an account has said about a topic this week. A thin answer means thin retrieval, not an empty corpus, so confirm coverage with search/tweets.

50 credits per call.

get/v1/twitter/ai-search

Request

  • Base URL: https://api.insightsocial.app
  • URL: https://api.insightsocial.app/v1/twitter/ai-search
  • Auth: API key in header x-api-key

Query parameters

querystring required
Example:What is @elonmusk saying about xAI this week?

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_handlesstring

Comma-separated X handles (max 10). Restricts the search to posts from these accounts only. Mutually exclusive with exclude_handles.

exclude_handlesstring

Comma-separated X handles (max 10) to exclude from search results. Mutually exclusive with from_handles.

from_datestring

ISO 8601 start date (YYYY-MM-DD). Limits the search window to posts on or after this date.

to_datestring

ISO 8601 end date (YYYY-MM-DD). Limits the search window to posts on or before this date.

dry_run'1'

Set to 1 to get the price of this call without making it: data.dry_run carries credits_min and credits_max. Nothing is charged.

Response

Success.

successtrue required
platformstring required
endpointstring required
schema_version'2' required
dataConventionsData required
unavailablestring[] required
credits_usedinteger required
credits_remaininginteger required
request_idstring required
cachedboolean required
idempotent_replayboolean required
charge_reasonstring required
free_callboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.