> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Answer analysis — brand mentions, rank, sentiment and source types

> Add include.analysis to an answer task and get every brand the answer names, how it treats each, and what kind of site each citation is.

Set `payload.include.analysis` to `true` and the task returns, next to the answer, every brand it names in order, whether it recommends each and how it speaks of it, whether your brand and competitors appear, and what kind of site each citation is. You can compute mention rate, average position, sentiment, share of voice and source share from it without running your own model over the answer.

## Request

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "CHATGPT",
    "payload": {
      "prompt": "best CRM for a small team",
      "country": "US",
      "include": { "analysis": true },
      "brand": "Acme CRM",
      "brandAliases": ["Acme"],
      "brandDomains": ["acme-crm.example"],
      "competitors": ["Northwind", { "name": "Contoso CRM", "aliases": ["Contoso"], "domains": ["contoso-crm.example"] }]
    }
  }'
```

| Field | Required | Description |
| - | - | - |
| `include.analysis` | Yes | `true` to run the analysis. |
| `brand` | No | Your brand's name, up to 200 characters. Not a URL: put sites in `brandDomains`. |
| `brandAliases` | No | Up to 20 other names for your brand. Only with `brand`. |
| `brandDomains` | No | Up to 20 sites, such as `acme-crm.example`. A citation on the site or a subdomain counts as yours. Only with `brand`. |
| `competitors` | No | Up to 50 competitors. Each is a name, or `{ name, aliases, domains }` with up to 20 aliases and 20 domains. |

Every name needs at least two characters, or an alias that has them. Without `brand` and `competitors`, the analysis still lists every brand the answer names.

## Supported engines

`CHATGPT`, `GEMINI`, `PERPLEXITY`, `GOOGLE`, `AIMODE`, `NAVER_AI_BRIEF` and `NAVER_AI_TAB` (and their aliases). On a `CHATGPT` task with `followUps`, the analysis reads the first answer.

## Credits

The analysis costs **1 credit** per task on top of the engine's price. The task holds it at submit and charges it only when `analysis.status` is `ok`. See [Credits and limits](/concepts/credits-and-limits.md).

## Response

The task's `response` gains an `analysis` object. For example:

```json theme={"theme":"css-variables"}
{
  "analysis": {
    "version": 1,
    "status": "ok",
    "brands": [
      { "name": "Northwind", "domain": null, "writtenAs": "Northwind", "spellings": ["Northwind"], "rank": 1, "role": "competitor", "recommended": true, "sentiment": "positive", "sentimentScore": 0.9 },
      { "name": "Acme CRM", "domain": "acme-crm.example", "writtenAs": "Acme", "spellings": ["Acme", "Acme CRM"], "rank": 2, "role": "brand", "recommended": true, "sentiment": "positive", "sentimentScore": 0.5 },
      { "name": "Fabrikam", "domain": "fabrikam.example", "writtenAs": "Fabrikam", "spellings": ["Fabrikam"], "rank": 3, "role": null, "recommended": false, "sentiment": "neutral", "sentimentScore": 0 }
    ],
    "targets": [
      { "name": "Acme CRM", "role": "brand", "mentioned": true, "rank": 2, "recommended": true, "sentiment": "positive", "sentimentScore": 0.5, "cited": true },
      { "name": "Northwind", "role": "competitor", "mentioned": true, "rank": 1, "recommended": true, "sentiment": "positive", "sentimentScore": 0.9, "cited": false },
      { "name": "Contoso CRM", "role": "competitor", "mentioned": false, "rank": null, "recommended": null, "sentiment": null, "sentimentScore": null, "cited": false }
    ],
    "sources": [
      { "position": 1, "url": "https://www.acme-crm.example/pricing", "domain": "acme-crm.example", "kind": "owned", "brand": "Acme CRM" },
      { "position": 2, "url": "https://www.g2.com/categories/crm", "domain": "g2.com", "kind": "reviews", "brand": null }
    ]
  }
}
```

| Field | Description |
| - | - |
| `status` | `ok`, `no_answer` or `failed`. See [Statuses](#statuses). |
| `brands` | Every brand the answer names, in the order it first names each. A product counts for its maker, so "MacBook Air" ranks Apple. `rank` starts at 1. `role` is `brand` or `competitor` for the brands you sent and `null` for the rest. |
| `brands[].name`, `domain`, `writtenAs`, `spellings` | `name` is the name you sent for your brand or a competitor. For any other brand it is the brand's own name, the same in every language: its official Latin-script name, or its original name when it has none, so 마켓컬리 and 컬리 are both `Kurly`. `domain` is the brand's site: the first of the domains you sent, or the one found for it, or `null`. `spellings` lists every way the answer writes the brand's name, in the order it first uses each, so Baemin lists 배민 and 배달의민족. A product or description written after the name is not part of a spelling. `writtenAs` is the first spelling. |
| `targets` | The brands you sent, in your order, each with `mentioned` and its `rank` in `brands`. `cited` is `true` when a citation is on one of its domains, and `false` when you sent no domains. |
| `recommended` | The answer recommends the brand or presents it as a good choice. |
| `sentiment`, `sentimentScore` | The stance the answer takes toward the brand, on five levels scored 0.9, 0.5, 0, -0.5 and -0.9. Praise or criticism of other brands does not count, and a recommendation or warning outweighs passing remarks. |
| `sources[].kind` | `owned` and `competitor` come from the domains you sent. Known sites follow fixed lists: `editorial` (news and magazines), `review_media` (product testing and review publications), `pr_wire`, `reviews` (user review platforms), `commerce`, `social` (social networks), `blog` (blog platforms), `community` (forums, Q\&A and wikis), `video` and `institution` (government and academic). A model classifies any other site once and the result is reused: `brand` (a company's own site), `content` (an independent site or personal blog) or one of the kinds above. `other` is left for sites that fit none, such as search engines and tools, or that could not be classified. |

## How it decides

* Which names are brands, which of them is yours, `recommended` and `sentiment` are judged by a model. Positions, ranks, name matching and source kinds are computed by rules, so the same model reading gives the same result.
* Your brand and competitors are found by their names and aliases with the same rules a [monitor](/monitors.md#how-names-are-matched) uses: whole words in Latin script, anywhere in Korean, Japanese, Chinese and Thai, never inside a citation link. The model also connects other spellings it finds. A spelling or product name counts for your brand or a competitor only when it is that brand's own name, short name, name in another language, maker, or product; a generic word, another brand, or another brand's product never counts. A name you send with a capital, such as Across, that the answer writes only in lowercase counts only when the model reads it as the brand: "works across teams" does not count, "adidas Runfalcon" does. A spelling it confirms as the brand's own name, such as 컬리 for Kurly, is kept and matched by rule in later answers. A name the answer does not contain is never reported.
* When your name matches but the model did not read it as a brand in this answer (a common word used another way), the brand is listed with `recommended`, `sentiment` and `sentimentScore` set to `null`.
* A model names each brand you did not send the first time any answer writes it, and its name and site are reused for every later answer. Brands already named with a cited site or a similar spelling are offered to it, so a branch or another script resolves to the same name. When naming fails, the brand keeps the answer's spelling and `domain` is `null`.
* One site is one brand: brands named with the same site are reported once, under the site's own name (Baemin for baemin.com) or else the name it was first given, so 아임웹 and I'mweb are one brand, and a brand found on the site of one you sent is that brand. A post on a blog, community, video or social platform is not linked to a brand you did not send, even on that brand's own platform, such as blog.naver.com for NAVER.
* A name the model reads as no brand, such as a generic word, a place or a treatment, is left out. Brands an answer writes as one name, such as "마켓컬리, 오아시스마켓, SSG닷컴", count as each brand, and a description after a name is not part of it.
* The model reads the first 40,000 characters of the answer. A brand first named after that is not reported.
* The analysis adds a few seconds before the task completes.

## Statuses

| `status` | Meaning | Charged |
| - | - | - |
| `ok` | The analysis ran. | 1 credit |
| `no_answer` | The engine completed without answer text, such as a Google search with no AI Overview. Every brand you sent is not mentioned. | No |
| `failed` | The analysis could not run. `error` is `ANALYSIS_FAILED`, `ANALYSIS_TIMEOUT` or `ANALYSIS_UNAVAILABLE`. The task still completes with its answer. | No |

## Errors

| Status | Code | When |
| - | - | - |
| `422` | `VALIDATION_ERROR` | `include.analysis` is not a boolean, the engine does not support analysis, or `brand`, `brandAliases`, `brandDomains` or `competitors` breaks the rules above. `details[].field` names the field. |

## Related

* [Markdown and raw responses](/engines/response-options.md)
* [GEO monitoring](/monitors.md): run the same analysis on a schedule.
* [Engine overview](/engines/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.