Introduction

The Query API is enabled by default. It was however disabled by default on self-managed instances versions < 5.25. To enable it on those deployments, add QUERY_API_ENDPOINTS to the configuration setting server.http_enabled_modules.

The Query API allows to execute Cypher statements against a Neo4j server through HTTP requests.

The main use case of the API is for developing client applications in languages for which there is no supported library. If there exists an official library (driver) for the language you are using, consider using that instead — see Create applications.

On self-managed instances, the API uses port 7474 for HTTP and port 7473 for HTTPS by default. Ports can be altered via the configuration settings server.http.listen_address and server.https.listen_address.
Aura instances support only HTTPS through port 443.

This guide assumes that you have:

The Query API supports HTTP/2 as well as HTTP/1.1, unless either is explicitly disabled in the server configuration setting server.http_enabled_transports. It’s up to the client to initiate a connection with the preferred protocol.

Glossary

Aura

Aura is Neo4j’s fully managed cloud service. It comes with both free and paid plans.

Cypher

Cypher is Neo4j’s graph query language that lets you retrieve data from the database. It is like SQL, but for graphs.

ACID

Atomicity, Consistency, Isolation, Durability (ACID) are properties guaranteeing that database transactions are processed reliably. An ACID-compliant DBMS ensures that the data in the database remains accurate and consistent despite failures.

causal consistency

A database is causally consistent if read and write queries are seen by every member of the cluster in the same order. This is stronger than eventual consistency.

transaction

A transaction is a unit of work that is either committed in its entirety or rolled back on failure. An example is a bank transfer: it involves multiple steps, but they must all succeed or be reverted, to avoid money being subtracted from one account but not added to the other.