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

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

Response

{
  "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
  }
}

Last updated

Was this helpful?