> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search dictionary entries

> Searches for standard and custom dictionary entries.

**Required ACL:** `settings`


## OpenAPI

````yaml specs/search.yml post /1/dictionaries/{dictionaryName}/search
openapi: 3.1.0
info:
  title: Search API
  summary: >-
    The Algolia Search API lets you search, configure, and manage your indices
    and records
  description: >
    ## Client libraries


    Use Algolia's API clients and libraries to reliably integrate Algolia's APIs
    with your apps.

    The official API clients are covered by Algolia's [Service Level
    Agreement](https://www.algolia.com/policies/sla).


    For more information, see [Algolia's
    ecosystem](https://www.algolia.com/doc/libraries).


    ## Base URLs


    Base URLs for the Search API:


    - `https://{APPLICATION_ID}.algolia.net`

    - `https://{APPLICATION_ID}-dsn.algolia.net`.
      If your subscription includes a [Distributed Search Network](https://dashboard.algolia.com/infra),
      this ensures that requests are sent to servers closest to users.

    Both URLs provide high availability by distributing requests with load
    balancing.


    **All requests must use HTTPS.**


    ## Retry strategy


    To guarantee high availability, implement a retry strategy for all API
    requests using the URLs of your servers as fallbacks:


    - `https://{APPLICATION_ID}-1.algolianet.com`

    - `https://{APPLICATION_ID}-2.algolianet.com`

    - `https://{APPLICATION_ID}-3.algolianet.com`


    These URLs use a different DNS provider than the primary URLs.

    Randomize this list to ensure an even load across the three servers.


    All Algolia API clients implement this retry strategy.


    ## Authentication


    Add these headers to authenticate requests:


    - `x-algolia-application-id`. Your Algolia application ID.

    - `x-algolia-api-key`. An API key with the necessary permissions to make the
    request.
      The required access control list (ACL) to make a request is listed in each endpoint's reference.

    You can find your application ID and API key in the [Algolia
    dashboard](https://dashboard.algolia.com/account/api-keys).


    ## Request format


    Depending on the endpoint, request bodies are either JSON objects or arrays
    of JSON objects.


    ## Parameters


    Parameters are passed as query parameters for GET and DELETE requests,

    and in the request body for POST and PUT requests.


    Query parameters must be
    [URL-encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding).

    Non-ASCII characters must be UTF-8 encoded.

    Plus characters (`+`) are interpreted as spaces.

    Arrays as query parameters must be one of:


    - A comma-separated string: `attributesToRetrieve=title,description`

    - A URL-encoded JSON array:
    `attributesToRetrieve=%5B%22title%22,%22description%22%D`


    ## Response status and errors


    The Search API returns JSON responses.

    Since JSON doesn't guarantee any specific ordering, don't rely on the order
    of attributes in the API response.


    Successful responses return `2xx` statuses. Client errors return `4xx`
    statuses. Server errors return `5xx` statuses.

    Error responses have a `message` property with more information.


    ## Version


    The current version of the Search API is version 1, indicated by the `/1/`
    in each endpoint's URL.
  version: 1.0.0
servers:
  - url: https://{appId}.algolia.net
    variables:
      appId:
        default: ALGOLIA_APPLICATION_ID
  - url: https://{appId}-1.algolianet.com
    variables:
      appId:
        default: ALGOLIA_APPLICATION_ID
  - url: https://{appId}-2.algolianet.com
    variables:
      appId:
        default: ALGOLIA_APPLICATION_ID
  - url: https://{appId}-3.algolianet.com
    variables:
      appId:
        default: ALGOLIA_APPLICATION_ID
  - url: https://{appId}-dsn.algolia.net
    variables:
      appId:
        default: ALGOLIA_APPLICATION_ID
security:
  - appId: []
    apiKey: []
tags:
  - name: Advanced
    description: Query your logs.
  - name: Api Keys
    x-displayName: API keys
    description: >
      Manage your API keys.


      API requests must be authenticated with an API key.

      API keys can have permissions (access control lists, ACL) and
      restrictions.
    externalDocs:
      url: https://www.algolia.com/doc/guides/security/api-keys
      description: API keys.
  - name: Clusters
    description: |
      Multi-cluster operations.

      Multi-cluster operations are **deprecated**.
      If you have issues with your Algolia infrastructure
      due to large volumes of data, contact the Algolia support team.
  - name: Dictionaries
    description: >
      Manage your dictionaries.


      Customize language-specific settings, such as stop words, plurals, or word
      segmentation.


      Dictionaries are application-wide.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp
      description: Natural languages.
  - name: Indices
    description: >
      Manage your indices and index settings.


      Indices are copies of your data that are stored on Algolia's servers.

      They're optimal data structures for fast search and are made up of records
      and settings.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices
      description: Manage your indices.
  - name: Records
    description: >
      Add, update, and delete records from your indices.


      Records are individual items in your index.

      When they match a search query, they're returned as search results, in the
      order determined by your ranking.

      Records are schemaless JSON objects.

      When adding or updating many records, check the [indexing rate
      limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data
      description: Prepare your records.
  - name: Rules
    description: >
      Create, update, delete, and search for rules.


      Rules are _if-then_ statements that you can use to curate search results.

      Rules have _conditions_ that can trigger _consequences_.

      Consequences are changes to the search results, such as changing the order
      of search results or boosting a facet.

      This can be useful for tuning specific queries or for merchandising.
    externalDocs:
      url: https://www.algolia.com/doc/guides/managing-results/rules/rules-overview
      description: Index Rules.
  - name: Search
    description: Search one or more indices for matching records or facet values.
  - name: Synonyms
    description: |
      Create, update, delete, and search for synonyms.

      Synonyms are terms that the search engine should consider equal.
    externalDocs:
      url: >-
        https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms
      description: Synonyms.
  - name: Vaults
    description: >-
      Algolia Vault lets you restrict access to your clusters to specific IP
      addresses and provides disk-level encryption at rest.
    externalDocs:
      url: https://www.algolia.com/doc/guides/security/algolia-vault
      description: Algolia Vault.
  - name: _model_index_settings
    x-displayName: Index settings
    description: |
      <SchemaDefinition schemaRef="#/components/schemas/indexSettings" />.
paths:
  /1/dictionaries/{dictionaryName}/search:
    post:
      tags:
        - Dictionaries
      summary: Search dictionary entries
      description: Searches for standard and custom dictionary entries.
      operationId: searchDictionaryEntries
      parameters:
        - $ref: '#/components/parameters/DictionaryName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: searchDictionaryEntriesParams
              description: Search parameter.
              type: object
              required:
                - query
              additionalProperties: false
              properties:
                query:
                  $ref: '#/components/schemas/query'
                hitsPerPage:
                  $ref: '#/components/schemas/hitsPerPage'
                language:
                  $ref: '#/components/schemas/supportedLanguage'
                page:
                  $ref: '#/components/schemas/page'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/searchDictionaryEntriesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '402':
          $ref: '#/components/responses/FeatureNotEnabled'
        '403':
          $ref: '#/components/responses/MethodNotAllowed'
        '404':
          $ref: '#/components/responses/IndexNotFound'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >-
            // Initialize the client

            var client = new SearchClient(new
            SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));


            // Call the API

            var response = await client.SearchDictionaryEntriesAsync(
              Enum.Parse<DictionaryType>("Stopwords"),
              new SearchDictionaryEntriesParams { Query = "about" }
            );


            // print the response

            Console.WriteLine(response);
        - lang: dart
          label: Dart
          source: |-
            // Initialize the client
            final client =
                SearchClient(appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');

            // Call the API
            final response = await client.searchDictionaryEntries(
              dictionaryName: DictionaryType.fromJson("stopwords"),
              searchDictionaryEntriesParams: SearchDictionaryEntriesParams(
                query: "about",
              ),
            );

            // print the response
            print(response);
        - lang: go
          label: Go
          source: >-
            // Initialize the client

            client, err := search.NewClient("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            response, err :=
            client.SearchDictionaryEntries(client.NewApiSearchDictionaryEntriesRequest(
              search.DictionaryType("stopwords"),
              search.NewEmptySearchDictionaryEntriesParams().SetQuery("about")))
            if err != nil {
              // handle the eventual error
              panic(err)
            }



            // print the response

            print(response)
        - lang: java
          label: Java
          source: >-
            // parameters

            // Initialize the client

            SearchClient client = new SearchClient("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY");


            // Call the API

            SearchDictionaryEntriesResponse response =
            client.searchDictionaryEntries(
              DictionaryType.STOPWORDS,
              new SearchDictionaryEntriesParams().setQuery("about")
            );


            // print the response

            System.out.println(response);
        - lang: javascript
          label: JavaScript
          source: >-
            // Initialize the client

            const client = algoliasearch('ALGOLIA_APPLICATION_ID',
            'ALGOLIA_API_KEY');


            // Call the API

            const response = await client.searchDictionaryEntries({
              dictionaryName: 'stopwords',
              searchDictionaryEntriesParams: { query: 'about' },
            });



            // print the response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >-
            // parameters

            // Initialize the client

            val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey =
            "ALGOLIA_API_KEY")


            // Call the API

            var response =
              client.searchDictionaryEntries(
                dictionaryName = DictionaryType.entries.first { it.value == "stopwords" },
                searchDictionaryEntriesParams = SearchDictionaryEntriesParams(query = "about"),
              )


            // print the response

            println(response)
        - lang: php
          label: PHP
          source: >-
            // Initialize the client

            $client = SearchClient::create('ALGOLIA_APPLICATION_ID',
            'ALGOLIA_API_KEY');


            // Call the API

            $response = $client->searchDictionaryEntries(
                'stopwords',
                ['query' => 'about',
                ],
            );



            // print the response

            var_dump($response);
        - lang: python
          label: Python
          source: >-
            # Initialize the client

            # In an asynchronous context, you can use SearchClient instead,
            which exposes the exact same methods.

            client = SearchClientSync("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY")


            # Call the API

            response = client.search_dictionary_entries(
                dictionary_name="stopwords",
                search_dictionary_entries_params={
                    "query": "about",
                },
            )



            # print the response

            print(response)
        - lang: ruby
          label: Ruby
          source: >-
            # Initialize the client

            client = Algolia::SearchClient.create("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY")


            # Call the API

            response = client.search_dictionary_entries(
              "stopwords",
              Algolia::Search::SearchDictionaryEntriesParams.new(query: "about")
            )



            # print the response

            puts(response)
        - lang: scala
          label: Scala
          source: >-
            // Initialize the client

            val client = SearchClient(appId = "ALGOLIA_APPLICATION_ID", apiKey =
            "ALGOLIA_API_KEY")


            // Call the API

            val response = Await.result(
              client.searchDictionaryEntries(
                dictionaryName = DictionaryType.withName("stopwords"),
                searchDictionaryEntriesParams = SearchDictionaryEntriesParams(
                  query = "about"
                )
              ),
              Duration(100, "sec")
            )


            // print the response

            println(response)
        - lang: swift
          label: Swift
          source: >-
            // Initialize the client

            let client = try SearchClient(appID: "ALGOLIA_APPLICATION_ID",
            apiKey: "ALGOLIA_API_KEY")


            // Call the API

            let response = try await client.searchDictionaryEntries(
                dictionaryName: DictionaryType.stopwords,
                searchDictionaryEntriesParams: SearchDictionaryEntriesParams(query: "about")
            )


            // print the response

            print(response)
        - lang: cURL
          label: curl
          source: |-
            curl --request POST \
              --url https://algolia_application_id.algolia.net/1/dictionaries/plurals/search \
              --header 'accept: application/json' \
              --header 'content-type: application/json' \
              --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
              --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
              --data '
            {
              "query": "",
              "page": 0,
              "hitsPerPage": 20,
              "language": "af"
            }
            '
components:
  parameters:
    DictionaryName:
      in: path
      name: dictionaryName
      description: Dictionary type in which to search.
      required: true
      schema:
        $ref: '#/components/schemas/dictionaryType'
  schemas:
    query:
      type: string
      description: Search query.
      default: ''
      x-categories:
        - Search
    hitsPerPage:
      type: integer
      description: Number of hits per page.
      default: 20
      minimum: 1
      maximum: 1000
      x-categories:
        - Pagination
    supportedLanguage:
      type: string
      description: ISO code for a supported language.
      enum:
        - af
        - ar
        - az
        - bg
        - bn
        - ca
        - cs
        - cy
        - da
        - de
        - el
        - en
        - eo
        - es
        - et
        - eu
        - fa
        - fi
        - fo
        - fr
        - ga
        - gl
        - he
        - hi
        - hu
        - hy
        - id
        - is
        - it
        - ja
        - ka
        - kk
        - ko
        - ku
        - ky
        - lt
        - lv
        - mi
        - mn
        - mr
        - ms
        - mt
        - nb
        - nl
        - 'no'
        - ns
        - pl
        - ps
        - pt
        - pt-br
        - qu
        - ro
        - ru
        - sk
        - sq
        - sv
        - sw
        - ta
        - te
        - th
        - tl
        - tn
        - tr
        - tt
        - uk
        - ur
        - uz
        - zh
    page:
      type: integer
      description: Page of search results to retrieve.
      default: 0
      minimum: 0
      x-categories:
        - Pagination
    searchDictionaryEntriesResponse:
      type: object
      additionalProperties: false
      properties:
        hits:
          type: array
          description: Dictionary entries matching the search criteria.
          items:
            $ref: '#/components/schemas/dictionaryEntry'
        nbHits:
          $ref: '#/components/schemas/nbHits'
        nbPages:
          $ref: '#/components/schemas/nbPages'
        page:
          $ref: '#/components/schemas/parameters_page'
      required:
        - hits
        - page
        - nbHits
        - nbPages
    dictionaryType:
      type: string
      enum:
        - plurals
        - stopwords
        - compounds
    dictionaryEntry:
      type: object
      description: Dictionary entry.
      additionalProperties: true
      required:
        - objectID
      properties:
        objectID:
          type: string
          description: Unique identifier for the dictionary entry.
          example: 828afd405e1f4fe950b6b98c2c43c032
        decomposition:
          type: array
          description: >-
            Invividual components of a compound word in the `compounds`
            dictionary.
          example:
            - kopf
            - schmerz
            - tablette
          items:
            type: string
        language:
          $ref: '#/components/schemas/supportedLanguage'
        state:
          $ref: '#/components/schemas/dictionaryEntryState'
        type:
          $ref: '#/components/schemas/dictionaryEntryType'
        word:
          type: string
          description: >-
            Matching dictionary word for `stopwords` and `compounds`
            dictionaries.
          example: the
        words:
          type: array
          description: Matching words in the `plurals` dictionary including declensions.
          example:
            - cheval
            - cheveaux
          items:
            type: string
    nbHits:
      type: integer
      description: Number of results (hits).
      example: 20
    nbPages:
      type: integer
      description: Number of pages of results.
      example: 1
    parameters_page:
      type: integer
      minimum: 0
      description: >
        Requested page of the API response.


        Algolia uses `page` and `hitsPerPage` to control how search results are
        displayed
        ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js)).


        - `hitsPerPage`: sets the number of search results (_hits_) displayed
        per page.

        - `page`: specifies the page number of the search results you want to
        retrieve. Page numbering starts at 0, so the first page is `page=0`, the
        second is `page=1`, and so on.


        For example, to display 10 results per page starting from the third
        page, set `hitsPerPage` to 10 and `page` to 2.
    ErrorBase:
      description: Error.
      type: object
      x-keep-model: true
      additionalProperties: true
      properties:
        message:
          type: string
          example: Invalid Application-Id or API-Key
    dictionaryEntryState:
      type: string
      enum:
        - enabled
        - disabled
      default: enabled
      description: Whether a dictionary entry is active.
    dictionaryEntryType:
      type: string
      enum:
        - custom
        - standard
      description: >-
        Whether a dictionary entry is provided by Algolia (standard), or has
        been added by you (custom).
  responses:
    BadRequest:
      description: Bad request or request arguments.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    FeatureNotEnabled:
      description: This feature is not enabled on your Algolia account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    MethodNotAllowed:
      description: Method not allowed with this API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
    IndexNotFound:
      description: Index not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBase'
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-algolia-application-id
      description: Your Algolia application ID.
    apiKey:
      type: apiKey
      in: header
      name: x-algolia-api-key
      description: >
        Your Algolia API key with the necessary permissions to make the request.

        Permissions are controlled through access control lists (ACL) and access
        restrictions.

        The required ACL to make a request is listed in each endpoint's
        reference.

````