neo4j

Get all nodes with same label using label name Cypher query neo4j

To get all nodes that have the same label from neo4j graph DB, you can use the below Cypher query.

MATCH (m:Movie)
RETURN m

Here, we are getting all nodes that have label named 'Movie'. The Cypher query will return all the nodes assigned to the Movie label.

MATCH (m:Movie)
RETURN m.title
Here we are getting all nodes with label Movie and return movie title from those nodes.
MATCH (m:Movie)
RETURN m
LIMIT 10
In the above Cypher query, we are returning 10 nodes that matched with the label 'Movie'.
Was this helpful?