Analysis

Analyze brand mentions in posts with AI

Changed on

Answers whether each post is about your brand, the author's attitude toward it & the author's relationship with it. Name the brand in analysis.targets. Each analyzed post costs 2 credits.

post/api/v1/x/analysis/brand

Request

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

Request body

tweetIdsstring[]

Post IDs or post URLs to analyze, up to 100.

querystring

X search to analyze, with the operators of /x/tweets/search, such as from:nasa or lang:en. X searches up to 512 characters, counted with the other search fields, as /x/tweets/search counts q.

usernamestring

Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.

listIdstring

Analyze a public List's posts. Send its ID or URL.

quotesOfstring

Analyze the quotes of 1 post. Send its ID or URL.

repliesTostring

Analyze the replies in 1 post's conversation. Send its ID or URL.

sinceTimestring

Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also work. A time without an offset is UTC.

untilTimestring

Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also work. A time without an offset is UTC.

queryType'Latest' | 'Top'

Search order. Default Latest.

limitinteger

Maximum posts to analyze from the search. Credits can return fewer.

cursorstring

The next_cursor of the page before. Send the same search with it.

textsstring[]

Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs the same as 1 analyzed post.

Example request

{
  "query": "Sony WH-1000XM6 lang:en",
  "limit": 20,
  "analysis": {
    "targets": [
      {
        "name": "Sony",
        "aliases": [
          "WH-1000XM6"
        ]
      }
    ]
  }
}

Response

Analyzed posts, posts without an analysis & their totals

has_next_pageboolean required

Whether the search has more posts. Send next_cursor as cursor.

next_cursorstring required

Cursor of the search's next page, else empty.

Example response

{
  "results": [],
  "unanalyzed": [
    {
      "id": "1893456789012345679",
      "status": "skipped",
      "reason": "post_unavailable"
    }
  ],
  "analysisSummary": {
    "schemaVersion": 1,
    "rows": {
      "analyzed": 20
    },
    "engagement": 1840,
    "questions": {
      "sentiment": {
        "type": "choice",
        "counts": {
          "positive": 12,
          "negative": 5,
          "mixed": 1,
          "neutral": 2,
          "unclear": 0
        },
        "shares": {
          "positive": 0.6,
          "negative": 0.25,
          "mixed": 0.05,
          "neutral": 0.1,
          "unclear": 0
        }
      }
    },
    "targets": [
      {
        "name": "Sony",
        "mentions": 14,
        "share": 0.7,
        "engagement": 1200,
        "choices": {
          "sentiment": {
            "positive": 9,
            "negative": 5
          }
        },
        "top": {
          "sentiment": {
            "negative": [
              {
                "tweetId": "1893456789012345678",
                "engagement": 412
              }
            ]
          }
        }
      }
    ],
    "cashtags": [
      {
        "cashtag": "$NVDA",
        "rows": 3,
        "choices": {
          "stance": {
            "bullish": 2,
            "bearish": 1
          }
        },
        "signal": {
          "bullish": 2,
          "bearish": 1,
          "score": 0.3333
        }
      }
    ],
    "sourceDomains": [
      {
        "domain": "youtube.com",
        "posts": 4
      }
    ],
    "viral": {
      "weights": "viral_lite:1",
      "scored": 20,
      "unscored": 0,
      "averageScore": 58,
      "verdicts": {
        "send_it": 6,
        "edit_first": 9,
        "sleep_on_it": 5
      }
    },
    "monitor": {
      "statuses": {
        "unchanged": 17,
        "changed": 2,
        "new_to_baseline": 1
      },
      "changedRows": [
        {
          "tweetId": "1893456789012345678",
          "changes": [
            {
              "questionId": "sentiment",
              "previous": "positive",
              "current": "negative"
            }
          ]
        }
      ]
    }
  }
}

Changes

    • ○

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

    • ▲

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

    • ○

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

    • ○

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

Of the 51 revisions, 1 has no diff computed.