Shobdo Logo

Search

Search across all available dictionaries. Results are ranked with exact matches first, then prefix matches, then substring matches.

GET /api/v1/search

Query Parameters

ParameterTypeRequiredDescription
qstringYesThe search query string.
langstringNoFilter by language. Use an ISO 639-1 code (e.g., en, fr) or a language pair (e.g., en-fr).
sourcestringNoFilter by a specific dictionary ID. Use the dictionaryId value from search results.
matchTypestringNoMatch strategy. One of: exact, prefix (default), contains.
limitintegerNoMax results to return. Default: 20, Max: 100.
offsetintegerNoNumber of results to skip for pagination. Default: 0.

Match Types

Prefix Match (prefix) — Default

Returns results where the word starts with the query. Example: q=bat matches "bat", "batter", "battery".

Exact Match (exact)

Only returns results where the word exactly matches the query. Example: q=bat matches "bat" but not "batter".

Contains Match (contains)

Returns results where the word contains the query anywhere. Example: q=bat matches "bat", "combat", "acrobat".

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.shobdo.me/api/v1/search?q=hello&lang=en&limit=5"

Example Response

{
  "ok": true,
  "data": [
    {
      "id": "42",
      "word": "hello",
      "preview": "Used as a greeting or to begin a phone conversation.",
      "sourceLang": "en",
      "targetLang": null,
      "dictionaryId": "...",
      "dictionaryName": "...",
      "partOfSpeech": "exclamation",
      "phonetic": "/həˈləʊ/",
      "hasAudio": true
    }
  ],
  "meta": {
    "total": 12,
    "limit": 5,
    "offset": 0,
    "took_ms": 38
  }
}

Result Object

FieldTypeDescription
idstringUnique entry identifier. Use with the Entry endpoint.
wordstringThe matched headword.
previewstringA short text preview of the definition.
sourceLangstringISO 639-1 source language code.
targetLangstring | nullISO 639-1 target language code (null for monolingual).
dictionaryIdstringThe dictionary this result came from.
dictionaryNamestringHuman-readable dictionary name.
partOfSpeechstring | undefinedPart of speech (noun, verb, etc.).
phoneticstring | undefinedIPA pronunciation.
hasAudiobooleanWhether this entry has a pronunciation audio clip.

Assistant

Hi! I'm the Shobdo Assistant.
Ask me anything about the documentation.