Get Synonym Map (Azure Cognitive Search REST API)

The Get Synonym Map operation gets the synonym map definition from Azure Cognitive Search.


HTTPS is required for all service requests. The Get Synonym Map request is constructed using HTTP GET.

GET https://[service name][synonymmap name]?api-version=[api-version]  
api-key: [admin key]  

The [synonymmap name] in the request URI specifies which synonym map to return from the synonymmaps collection.

The [api-version] is required. The current version is 2019-05-06. See API versions in Azure Cognitive Search for details.

Request Headers

The following list describes the required and optional request headers.

Request Header Description
Content-Type: Required. Set this to application/json.
api-key: Required. The api-key is used to authenticate the request to your Search service. It is a string value, unique to your service. The Get Synonym Map request must include an api-key header set to your admin key (as opposed to a query key).

You will also need the service name to construct the request URL. You can get both the service name and api-key from your service dashboard in the Azure portal. See Create an Azure Cognitive Search service for details.

Request Body



Status Code: 200 OK is returned for a successful response.

The response is similar to examples in Create Synonym Map (Azure Cognitive Search REST API).

    "name" : "synonymmap1",  
    "format" : "solr",  
    "synonyms" : "United States, United States of America, USA\n
    Washington, Wash. => WA"

See also

Azure Cognitive Search REST APIs
HTTP status codes (Azure Cognitive Search)
Synonym map operations (Azure Cognitive Search REST API)
Naming rules (Azure Cognitive Search)