Users

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. Its alias is query. Xquik's cap is 4,096 characters.

typesstring
Example:users,topics

Comma-separated suggestion types from users, topics, hashtags & cashtags. Omit for all. With only hashtags or only cashtags, the query gets its # or $ when it lacks one. Any case works. It allows 66 characters for every choice once with spaces around commas.

limitinteger

Most suggestions to return, from 1 to 100. Default 20. Accounts fill it first, then topics, hashtags & cashtags. A low credit balance can return fewer. Its aliases are pageSize, count, max_results, maxItems, max_items & per_page.

fieldsstring
Example:id,text,author.username

Fields to keep in each row, comma-separated. Use dots for nested fields, such as author.username. A list keeps the field in each item. Case & underscores do not matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics always stay. An unknown name answers 400 unknown_field with the valid names, before any read. The price stays the same. SDK row types then hold only the named fields. A longer URL fails at the edge before Xquik reads it.

omitstring
Example:entities,media

Fields to drop from each row, comma-separated. It takes the same names as fields. With fields, it drops from the kept fields. A longer URL fails at the edge before Xquik reads it.

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

    • warning

      added the new topup_in_progress enum value to the ///// response property for the response status

    • warning

      added the new topup_in_progress enum value to the ////// response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the / response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the // response property for the response status

    • warning

      added the new topup_in_progress enum value to the ////// response property for the response status

    • warning

      added the new topup_in_progress enum value to the /////// response property for the response status

    • warning

      added the new topup_in_progress enum value to the ////// response property for the response status

    • warning

      added the new topup_in_progress enum value to the /////// response property for the response status