API Reference
Neo4j JavaScript Driver
Official Neo4j driver for JavaScript, running Cypher queries over Bolt with sessions and transactions.
Official Documentation ↗CompatibilityThis documentation covers version
v6.3.0. Check the official docs for the latest API surface.Installation
npm
npm install neo4j-driverMethods
No methods match this filter.
The driver opens sessions per database and runs Cypher with parameterized queries over the Bolt protocol.
Key Features
- Session and transaction management
- Parameterized Cypher queries
- Driver-level connection pool
Usage Notes
Pin a version and check the official docs for the API surface you depend on before upgrading.
Errors
The following points are quoted verbatim from the official documentation. 来源:https://neo4j.com/docs/javascript-manual/current/ · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:51:05.030Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.
- The driver automatically re-executes the callback in case of server failure. (https://neo4j.com/docs/javascript-manual/current/)
FAQ
- What is the difference between run and executeWrite?
- session.run auto-commits a single statement. executeWrite wraps a callback in a managed transaction with retries, which is correct for multi-statement work.
- How do I return integers safely?
- Neo4j integers are 64-bit and deserialize to Integer objects. Call .toNumber() when the value fits in a JavaScript safe integer.
- Should I create a driver per request?
- No. Create one driver per application and per cluster; it maintains a pool. Create and close sessions per unit of work instead.
Report a problem with this API docOpens a pre-filled issue on GitHub.