View API Reference



API Method Description PHP Ruby JS Python iOS Android C# Java Go Scala name
Save synonym

Create or update a single synonym on an index.

saveSynonym saveSynonym save_synonym save_synonym saveSynonym saveSynonym saveSynonym AddSynonym save synonym
Batch synonyms

Create or update multiple synonyms.

batchSynonyms batchSynonyms batch_synonyms batch_synonyms batchSynonyms batchSynonyms batchSynonyms BatchSynonyms save synonyms
Delete synonym

Remove a single synonym from an index using its object id.

deleteSynonym deleteSynonym delete_synonym delete_synonym DeleteSynonyms deleteSynonym deleteSynonym DeleteSynonym delete synonym
Clear all synonyms

Remove all synonyms from an index.

clearSynonyms clearSynonyms clear_synonyms clear_synonyms clearSynonyms clearSynonyms clearSynonyms ClearSynonyms clear synonyms of index
Get synonym

Get a single synonym using its object id.

getSynonym getSynonym get_synonym get_synonym getSynonym getSynonym getSynonym GetSynonym get synonym
Search synonyms

Get all synonyms that match a query.

searchSynonyms searchSynonyms search_synonyms search_synonyms searchSynonyms searchSynonyms searchSynonyms SearchSynonyms search synonyms of

Algolia synonyms

A synonym record includes an objectID, the type of synonym, and a list of words as synonyms.

  objectID: 'a-unique-identifier',
  type: 'synonym',
  synonyms: ['car', 'vehicle', 'auto']

There are 4 types of synonym:

  • bi-directional, where the words are interchangeable
  • one-way, where a master word is used to find the other words, but not vice-versa
  • altcorrection1 or altcorrection2, where synonyms are used to resolve typos of 1 or 2 degrees
  • placeholder, where you define tokens (variables) that take any value from a list of defined words. See placeholders.

For more detail: