Users

Get search suggestions for a partial query

Changed on

Returns the accounts, topics, hashtags & cashtags X suggests while someone types a search. X may rank them differently per request. Costs 1 credit per suggestion.

get/api/v1/x/search/autocomplete

Request

  • Base URL: https://xquik.com
  • URL: https://xquik.com/api/v1/x/search/autocomplete
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • none

Query parameters

qstring required
Example:nasa

Text typed so far. Start with # for hashtags or $ for cashtags. A # query returns hashtags & the accounts X suggests for it. Alias: query.

typesstring
Example:users,topics

Comma-separated suggestion types: users, topics, hashtags or cashtags. Omit for all. With only hashtags or only cashtags, the query gets its # or $ when it lacks one.

limitinteger

Most suggestions to return: 1 to 100, default 20. Accounts fill it first, then topics, hashtags & cashtags. Credits can return fewer. Aliases: pageSize, count, max_results, maxItems, max_items & per_page.

Response

Search suggestions

querystring required

The query you sent, trimmed.

countinteger required

Suggestions returned across all 4 lists. Each costs 1 credit.

Example response

{
  "query": "nasa",
  "users": [
    {
      "id": "11348282",
      "username": "NASA",
      "name": "NASA",
      "verified": true,
      "isBlueVerified": true,
      "isVerified": false,
      "verifiedType": "Government",
      "protected": false,
      "location": "Pale Blue Dot",
      "profilePicture": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
      "badges": [],
      "isPersonaMediaGenable": false,
      "score": 0,
      "tokens": [],
      "inline": false
    }
  ],
  "topics": [
    {
      "topic": "nasa",
      "score": 0,
      "tokens": [],
      "inline": false
    }
  ],
  "hashtags": [],
  "cashtags": [],
  "count": 2
}

Changes

    • ▲

      the response property ///// became optional for the status

    • ○

      added the optional property //// to the response with the status

Of the 51 revisions, 1 has no diff computed.