<!-- The markdown copy of https://oppalerts.com/docs/api/llm_answers_search_keywords . All pages: https://oppalerts.com/docs/llms.txt -->

[Documentation](https://oppalerts.com/docs/) / [API](https://oppalerts.com/docs/api/) / llm_answers_search_keywords

# llm_answers_search_keywords

`POST https://api.oppalerts.com/v1/llm_answers/search_keywords`

The search keywords the AI models say people in this market search for, scored across every model and run.

## What it does

The tool lists the search keywords that the AI models say people in this market search for. It scores each keyword across every model and every run.

It needs a campaign.

## Authentication

Send a token in the `Authorization: Bearer` header. [How to get a token](https://oppalerts.com/docs/api/).

## Parameters

**`campaign`int, required, 1 to 4294967295**

The campaign id, from [campaigns_list](https://oppalerts.com/docs/mcp/campaigns_list). It must be a campaign of your account.

**`page`int, required, 1 to 1000**

The page to return, a whole number from 1 to 1000. A page holds 1000 items.

## Strict Rules

- A field that is not in the list above is refused. The answer is HTTP 400 with the error code `bad_param`. The error names the field: "<field> is not a field of this tool." The old name of a renamed field is refused in the same way.
- A bad value is refused, and the error names the field. A bad value is a value of the wrong type, a number with a fraction for a whole-number field, a value out of its range, or a value that is not in its list. A required field that you do not send is refused too. The tool never changes a value that you send.
- An error about the format of a call, such as a refused field, names the field. Its message ends with one sentence: "Read the documentation at https://oppalerts.com/docs for the correct format." Every other error has only its own sentence.

## Example

### Request

```bash
curl -X POST https://api.oppalerts.com/v1/llm_answers/search_keywords \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"campaign": 3, "page": 1}'
```

### Response

The full sample answer.

```json
{
  "models_total": 6,
  "total": 412,
  "page": 1,
  "pages": 1,
  "items": [
    {
      "item": "boutique hotels chicago",
      "agreement_score": 3.802,
      "appearances": 11,
      "models": 7,
      "best_rank": 1,
      "forms": {
        "boutique hotels chicago": 11
      }
    },
    {
      "item": "best boutique hotel brands",
      "agreement_score": 2.44,
      "appearances": 8,
      "models": 5,
      "best_rank": 1,
      "forms": {
        "best boutique hotel brands": 8
      }
    }
  ]
}
```

### Response fields

- `models_total`: the number of AI models in the runs.
- `total`: the number of items in the whole list.
- `page` and `pages`: this page and the number of pages.
- `items`: the list, best score first. Each item has the fields below.

**`item`**

a search keyword.

**`agreement_score`**

The score of the item across every model and run.

**`appearances`**

How many times the models returned the item.

**`models`**

How many models returned the item. The response does not identify the models.

**`best_rank`**

The item’s highest rank in a single response.

**`forms`**

The ways the models wrote the item, each with its count. Items merge on normalized text, so several forms can share one item.

## Errors

- `bad_param` (HTTP 400): a field is not a field of this tool, a required field is not sent, or a value has the wrong type or is out of its range. `campaign` and `page` are required, and `page` runs from 1 to 1000. The error names the field.
- `no_campaign` (HTTP 404): That campaign is not in this account. The same error comes for a campaign id that does not exist.
- `daily_limit` (HTTP 429): the account has used all its calls for this tool today. [account_calls_left](https://oppalerts.com/docs/api/account_calls_left) shows when the count resets.

This tool has its own daily count. A call through the API or MCP uses one call from this count. A web app page reading the same data does not count. It is not an index search, so it does not use the shared count of the `news_` and `prospects_` tools, and the error `one_at_a_time` does not apply to it.

## Same tool in MCP

The MCP tool `llm_answers_search_keywords` gives the same data. See [llm_answers_search_keywords in MCP](https://oppalerts.com/docs/mcp/llm_answers_search_keywords).

## Related pages

- [llm_answers_search_keywords in MCP](https://oppalerts.com/docs/mcp/llm_answers_search_keywords)
- [Keyword Research in the web app](https://oppalerts.com/docs/app/content/keyword_research)
- [llm_answers_top_sites: The same shape for domains](https://oppalerts.com/docs/api/llm_answers_top_sites)
