Fastest Path to Graph Queries

Neo4j Cypher Query Language

Cypher is a declarative graph query language that is used by developers worldwide. Created by Neo4j, Cypher provides expressive and efficient queries for property graphs.

What is Cypher?

Visual, Intuitive, and Powerful Graph
Data Query Language

Cypher’s easy-to-learn pattern constructs make it accessible for developers, data scientists, and those with limited query language experience. Users can simply express what data to retrieve while the underlying engine completes the task – eliminating the need for technical implementation knowledge.

A visual way of matching patterns and relationships using Cypher

Benefits of Neo4j Cypher Query Language

The property graph data model is increasingly popular across a wide variety of application domains, with growing adoption in multiple products and projects. Cypher is the most established and intuitive query language to learn for working with property graphs.

Easy to Learn

A Cypher statement is quite compact. It expresses references between nodes as visual patterns, which makes them easy to understand. Cypher has a low-learning curve, which helps users quickly write expressive, intuitive queries to retrieve results faster. Find a Cypher learning track in our GraphAcademy.

Visual and Logical

Match patterns of nodes and relationships in the graph using ASCII-Art syntax. These patterns map directly to the domain model drawn in diagrams or on whiteboards. As a result, there is no impedance mismatch between the model, the database, and the query language.

Secure, Reliable, and Data-Rich

Cypher is well-suited for application development and data analytics. It reduces repeated calls to the database and expresses use-case specific data needs in single, compact queries. Neo4j drivers use reactive programming approaches that save cloud computing resources and manage back-pressure.

Open and Flexible

Cypher is an open data query language, based on the openCypher initiative. It is extensible with user-defined functions and procedures. The Neo4j implementation of the Cypher parser, planner, and runtime is open source.

Experiment with Cypher in AuraDB Free, our cloud-based graph database. Try Cypher

No More Complex Joins

Cypher is a graph-optimized query language that understands, and takes advantage of, data connections. It follows connections – in any direction – to reveal previously unknown relationships and clusters. Cypher queries are much easier to write than massive SQL joins. Compare this Cypher query to its equivalent in SQL.

MATCH (p:Product)-[:CATEGORY]->(l:ProductCategory)-[:PARENT*0..]->(:ProductCategory {name:"Dairy Products"})
SELECT p.ProductName
FROM Product AS p
JOIN ProductCategory pc ON (p.CategoryID = pc.CategoryID AND pc.CategoryName = "Dairy Products")

JOIN ProductCategory pc1 ON (p.CategoryID = pc1.CategoryID)
JOIN ProductCategory pc2 ON (pc1.ParentID = pc2.CategoryID AND pc2.CategoryName = "Dairy Products")

JOIN ProductCategory pc3 ON (p.CategoryID = pc3.CategoryID)
JOIN ProductCategory pc4 ON (pc3.ParentID = pc4.CategoryID)
JOIN ProductCategory pc5 ON (pc4.ParentID = pc5.CategoryID AND pc5.CategoryName = "Dairy Products");