Skip to main content
This page documents an earlier version of the API client. For the latest version, see Retrieve a synonym.
Required ACL: settings

Examples

Synonym synonym = index.GetSynonym("synonymID");

// Asynchronous
Synonym synonym = index.GetSynonymAsync("synonymID");

Parameters

objectID
string
required
Unique identifier of the synonym you want to retrieve.

Response

corrections
string[]
List of corrections. (For synonym types altCorrection1 or altCorrection2).
input
string
A word used as the basis for synonyms. (For synonym type oneWaySynonym).
objectID
string
The object ID of the retrieved synonym.
placeholder
string
A word used as the basis for replacements. (For synonym type placeholder).
replacements
string[]
List of replacements for the placeholder. (For synonym type placeholder).
synonyms
string[]
List of synonyms. (For synonym types synonym or oneWaySynonym).
type
string
Synonym type. One of:
  • altCorrection1
  • altCorrection2
  • oneWaySynonym
  • placeholder
  • synonym
word
string
A word used as the basis for corrections. (For synonym types altCorrection1 or altCorrection2).

Response as JSON

This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use the getLogs method. Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
{
  "objectID": "a-unique-identifier",
  "type": "synonym",
  "synonyms": [
    "car",
    "vehicle"
  ]
}
I