Get ID for each node


I want to get ID for each node. I am using movie data from neo4j database.

In Neo4j desktop, i get the output i want.

But when i using the same cypher query in Python, i dont get the same output as in No4j.

Below is my code in Python.

result ="MATCH (a:Person{name:$name})"
                         "-[:ACTED_IN]->(listMovie) "
                         "RETURN a,listMovie as listMovies", name=name).data()

Then this is the output when i apply using Python. There is no ID (identity) for each node.

Please help me, what mistake i did. Thank you!

Hello :slight_smile:

You are not doing something wrong, should have a look at the function id() to get the Neo4j ID and the function properties() to get the properties of a node :slight_smile:


Thanks so much! Got it.