# @neo4j/cypher-builder

> A programmatic API for building Cypher queries for Neo4j

Latest version **3.3.0** (published 2026-05-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @neo4j/cypher-builder
pnpm add @neo4j/cypher-builder
yarn add @neo4j/cypher-builder
bun add @neo4j/cypher-builder
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.3.0 |
| Published | 2026-05-28 |
| First published | 2022-10-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 0 |
| Unpacked size | 459.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 84 |
| Author | Neo4j Inc. |
| Maintainers | neo4j-organization, oskarhane, linuslundahl, adamcowley, darrellwarde, oskardamkjaer |
| Keywords | neo4j, cypher, query, builder |

## Links

- npm: https://www.npmjs.com/package/@neo4j/cypher-builder
- Repository: https://github.com/neo4j/cypher-builder
- Homepage: https://neo4j.github.io/cypher-builder/
- Issues: https://github.com/neo4j/cypher-builder/issues
- npm.io page: https://npm.io/package/@neo4j/cypher-builder

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 3.3.0 (latest) — 2026-05-28
- 3.2.2 — 2026-05-18
- 3.2.1 — 2026-05-01
- 3.2.0 — 2026-04-23
- 3.1.0 — 2026-04-13
- 3.0.1 — 2026-03-23
- 3.0.0 — 2026-03-12
- 2.12.0 — 2026-02-17
- 2.11.0 — 2025-11-25
- 2.10.0 — 2025-10-22
- 2.9.0 — 2025-10-15
- 2.8.1 — 2025-10-13
- 2.8.0 — 2025-08-19
- 2.7.2 — 2025-08-04
- 2.7.1 — 2025-06-25
- … 83 more at https://npm.io/package/@neo4j/cypher-builder/versions

## README

# Cypher Builder

[![npm version](https://badge.fury.io/js/@neo4j%2Fcypher-builder.svg)](https://www.npmjs.com/package/@neo4j/cypher-builder)
[![Test](https://github.com/neo4j/cypher-builder/actions/workflows/test.yml/badge.svg)](https://github.com/neo4j/cypher-builder/actions/workflows/test.yml)
[![Lint](https://github.com/neo4j/cypher-builder/actions/workflows/lint.yml/badge.svg)](https://github.com/neo4j/cypher-builder/actions/workflows/lint.yml)

Cypher Builder is a JavaScript programmatic API to create [Cypher](https://neo4j.com/docs/cypher-manual/current/) queries for [Neo4j](https://neo4j.com/).

- [Documentation](https://neo4j.com/docs/cypher-builder/current/)

```typescript
import Cypher from "@neo4j/cypher-builder";

const movieNode = new Cypher.Node();
const pattern = new Cypher.Pattern(movieNode, { labels: ["Movie"] });

const matchQuery = new Cypher.Match(pattern)
    .where(movieNode, {
        title: new Cypher.Param("The Matrix"),
    })
    .return(movieNode.property("title"));

const { cypher, params } = matchQuery.build();

console.log(cypher);
console.log(params);
```

_Cypher_

```cypher
MATCH (this0:Movie)
WHERE this0.title = $param0
RETURN this0.title
```

_Params_

```typescript
{
    "param0": "The Matrix",
}
```

# Contributing

See our [contributing guide](./CONTRIBUTING.md) for development instructions.

# Examples

You can find usage examples in the [examples](https://github.com/neo4j/cypher-builder/tree/main/examples) folder.

> This library is for JavaScript and TypeScript only. If you are using Java, check [Neo4j Cypher DSL](https://neo4j.github.io/cypher-dsl).

---
_Source: https://npm.io/package/@neo4j/cypher-builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
