# Did You Mean API

> Did You Mean suggests spelling corrections for misspelled search queries and phrases. Pass any text string to receive the original query along with a list of alternate spelling suggestions.

**Endpoint:** `GET https://api.apiverve.com/v1/didyoumean`  
**Category:** Text Processing  
**Cost:** 20 credits per call  
**Canonical page:** https://apiverve.com/marketplace/didyoumean

## Overview

A did you mean API for search boxes, help centers and chat inputs. Did You Mean takes a query that may contain spelling mistakes or awkward phrasing and returns alternative versions of it, similar to Google's did you mean prompt under a search box.

You send one query string and get back the original query plus an array of suggested rewrites with misspelled words corrected and the wording tidied, for example "what weather today is" becoming "what is the weather today". Product teams use it to rescue zero-result searches, offer typo suggestions before running an expensive lookup, and clean up user-typed phrases before passing them to another service.

Suggestions are generated by an AI language model, so the same query can return slightly different alternatives on different calls. Every plan, including the Free plan, receives the full response: the query and the complete list of suggestions.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/didyoumean?query=what%20weather%20today%20is" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | The text you want to check for spelling mistakes |

## Response fields

- `query` — string · Original input query text provided by user
- `didYouMean` — array · Array of spelling suggestions and corrections

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "query": "what weather today is",
    "didYouMean": [
      "what is the weather today",
      "what's the weather like today",
      "what will be the weather today"
    ]
  }
}
```

## Use cases

- **E-Commerce Search Suggestions** — When shoppers mistype product names in a store search bar, display alternate spelling recommendations so they still find inventory.
- **Help Desk Query Fallback** — To prevent dead ends in customer support portals, offer corrected search terms whenever a knowledge base query returns zero articles.
- **User Form Normalization** — Clean user-submitted tags and profile fields during registration by matching misspellings against recommended corrections before saving entries to the database.
- **Chatbot Typo Recovery** — Chatbots can parse incoming user messages with spelling mistakes and prompt users with suggested corrections before triggering fallback handlers.

## SDKs

- **npm** — `npm install @apiverve/didyoumean` (https://www.npmjs.com/package/@apiverve/didyoumean)
- **NuGet** — `dotnet add package APIVerve.API.DidYouMean` (https://www.nuget.org/packages/APIVerve.API.DidYouMean)
- **Source** — https://github.com/apiverve/didyoumean-api

## More

- Full reference: https://docs.apiverve.com/ref/didyoumean
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
