# Query misspelling

POST `/check-spelling`

This endpoint lets you check for any misspelling in the search query.

**Headers**

| Header          | Type   | Description   |
| --------------- | ------ | ------------- |
| `Authorization` | string | Bearer token. |

**Request body**

```json
{
  "query": "your search query here"
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "status": "success",
  "data": {
    "originalQuery": "the original query",
    "language": {
      "name": "English (US)",
      "code": "en-US",
      "detectedLanguage": {
        // detected language details
      }
    },
    "matches": [
      {
        "message": "Description of the issue",
        "shortMessage": "Brief description",
        "offset": 0,
        "length": 5,
        "replacements": ["suggestion1", "suggestion2", "..."],
        "context": {
          "text": "Context around the error",
          "offset": 0,
          "length": 10
        },
        "rule": {
          "id": "RULE_ID",
          "description": "Rule description",
          "category": "Category name"
        },
        "type": "issue type"
      }
    ],
    "matchCount": 1,
    "confidence": 0.85,
    "hasIssues": true
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.searchagora.com/search/query-misspelling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
