> For the complete documentation index, see [llms.txt](https://docs.zingg.ai/zingg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zingg.ai/zingg/connect-your-data/connect-graph-databases-neo4j.md).

# Connect Graph Databases (Neo4j)

Configure Zingg to connect to Neo4j for writing resolved entity output to a graph database.

{% hint style="success" icon="right-long" %}
New to Zingg pipes? Understand how pipes work before configuring them - [Pipes and data connections](/zingg/connect-your-data/pipes-and-data-connections.md).
{% endhint %}

The Neo4j connection configuration is available on this page. Zingg resolves entities into clusters and writes them to Neo4j, where the graph database handles downstream relationship analysis. Available in all editions.

### Python API

```python
from zingg.client import*
from zingg.pipes import*

neo4jPipe =
Pipe("neo", "org.neo4j.spark.DataSource")
neo4jPipe.addProperty("url", "bolt://localhost:7687")
neo4jPipe.addProperty("labels", "Person")
args.setData(neo4jPipe)
```

### JSON Config

```json
{
  "data" : [ {
    "name" : "neo",
    "format" : "org.neo4j.spark.DataSource",
    "props" : {"url" : "bolt://localhost:7687", "labels" : "Person"}
  } ]
}
```

The `url` property is the Neo4j bolt connection URI. The labels property sets the Neo4j node label for the resolved entities that Zingg writes to the graph.

The Neo4j Spark connector JAR is required. Add it to your Spark classpath via `zingg.conf` before running.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zingg.ai/zingg/connect-your-data/connect-graph-databases-neo4j.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
