Chapter 1. Introduction

Go here for documentation for APOC for Neo4j version 3.0.x 3.1.x 3.2.x 3.3.x 3.4.x 3.5.x

1.1. Documentation Overview


Neo4j 3.x introduced the concept of user-defined procedures and functions. Those are custom implementations of certain functionality, that can’t be (easily) expressed in Cypher itself. They are implemented in Java and can be easily deployed into your Neo4j instance, and then be called from Cypher directly.

The APOC library consists of many (about 450) procedures and functions to help with many different tasks in areas like data integration, graph algorithms or data conversion.

1.1.1. License

Apache License 2.0

1.1.2. "APOC" Name history

Apoc was the technician and driver on board of the Nebuchadnezzar in the Matrix movie. He was killed by Cypher.

APOC was also the first bundled A Package Of Component for Neo4j in 2009.

APOC also stands for "Awesome Procedures On Cypher"

1.2. Installation: With Neo4j Desktop

APOC is easily installed with Neo4j Desktop, after creating your database just go to the "Manage" screen and the "Plugins" tab. Then click "Install" in the APOC box and you’re done.

desktop apoc

1.3. Feedback

Please provide feedback and report bugs as GitHub issues or join the Neo4j Community Forum and ask in the APOC & Procedures category.

1.4. Calling Procedures & Functions within Cypher

User defined Functions can be used in any expression or predicate, just like built-in functions.

Procedures can be called stand-alone with CALL;

But you can also integrate them into your Cypher statements which makes them so much more powerful.

Load JSON example. 

WITH '{branch}/src/test/resources/person.json' AS url

CALL apoc.load.json(url) YIELD value as person

MERGE (p:Person {})
   ON CREATE SET p.age = person.age, p.children = size(person.children)