MarkLogic Data Hub Service

Fast data integration + improved data governance and security, with no infrastructure to buy or manage.

Learn More


Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up


MarkLogic World 2019

Learn how to simplify data integration & build innovative applications. Join us in Washington D.C. May 14-15!

Find Out More


Stay On Top Of Everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

MarkLogic Node.js Client API

The MarkLogic Node.js Client API is an open-source JavaScript library that allows developers to quickly, easily, and reliably access MarkLogic from their Node applications.

The Node.js API is developed in the open on GitHub. Submit issues and pull requests there to contribute.

Node.js Client API on GitHub ›



The Node.js Client API is available from npm. From within your project directory run the following at the commandline:

npm install marklogic --save

Learn more about installing and using npm.

Additional releases and the latest development branch are available on GitHub.


For developers using—or looking to use—Node.js in their application stack, the Node.js Client API is the fastest, easiest, and most reliable way to communicate with a MarkLogic database.

The API provides an asynchronous JavaScript interface for key MarkLogic capabilities, such as

  • search
  • document management
  • batch loading
  • transactions
  • aggregates

Combined with MarkLogic's ability to index and manage JSON documents natively, the Node.js Client API is an ideal tool for full-stack JavaScript development.

The Node.js Client API is written in JavaScript specifically for Node. It encapsulates best practices on both the Node and MarkLogic ends, for example, enforcing entirely asynchronous I/O and providing conveniences for building complex queries that leverage MarkLogic’s rich indexes.

Its interface is designed to be familiar and comfortable to Node developers. For performance-critical or resource-intensive operations, the Node.js Client API provides an extension mechanism that executes JavaScript on Server, where it runs close to the data.

Tutorials and Samples


Required Software is listed in the Node.js Application Developer's Guide, including supported versions of Node.js.

See Also

MarkLogic also provides supported APIs for Java and generic REST/HTTP clients.


Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.


The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • "Node.js Client API Getting Started" is linked to the staging site. Cannot access the link.
    • Thanks, it should work now.
      • This is working fine for small documents like 500KB. Whenever I used Marklogic nodejs library to read document large document like 2 MB or 10 MB. I am getting single chunk as a success request and also I get null response. can you help me?