Neatly Packaged Modules

    TypeScript icon, indicating that this package has built-in type declarations

    2.2.0 • Public • Published

    Nodejs Integration Bundler codecov Chat PRs welcome!

    OpenSearch logo

    OpenSearch Node.js client


    opensearch-js is a community-driven, open source fork of elasticsearch-js licensed under the Apache v2.0 License. For more information, see

    Example use

    The OpenSearch JavaScript client provides a safer and easier way to interact with your OpenSearch cluster. Rather than using OpenSearch from the browser and potentially exposing your data to the public, you can build an OpenSearch client that takes care of sending requests to your cluster.

    The client contains a library of APIs that let you perform different operations on your cluster and return a standard response body. The example here demonstrates some basic operations like creating an index, adding documents, and searching your data.


    To add the client to your project, install it with npm:

    npm i @opensearch-project/opensearch

    If you prefer to add the client manually or just want to examine the source code, see opensearch-js on GitHub.

    Then require the client:

    const { Client } = require('@opensearch-project/opensearch');

    Sample code

    Please see the USER_GUIDE for code snippets.

    Project Resources

    Code of Conduct

    This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ, or contact with any additional questions or comments.


    This project is licensed under the Apache v2.0 License.


    Copyright OpenSearch Contributors. See NOTICE for details.


    npm i @opensearch-project/opensearch

    DownloadsWeekly Downloads






    Unpacked Size

    1.3 MB

    Total Files


    Last publish


    • opensearch-project-bot
    • mattsb42-aws
    • avillk
    • peterzhuamazon
    • mihir
    • cehenkle
    • amzn-oss
    • seanneumann