Procedures & Functions

This is the page for APOC Core documentation. For APOC Extended, go to the APOC Extended page.

apoc

Qualified Name Type

apoc.case(conditionals [Any], elseQuery String, params Map) - for each pair of conditional and read-only queries in the given list, this procedure will run the first query for which the conditional is evaluated to true. If none of the conditionals are true, the ELSE query will run instead.

Procedure

apoc.help() - returns descriptions of the available APOC procedures and functions. If a keyword is provided, it will return only those procedures and functions that have the keyword in their name.

Procedure

apoc.version() - returns the APOC version currently installed.

Function

apoc.when(condition Boolean, ifQuery String, elseQuery String, params Map<String, Any>) - this procedure will run the read-only ifQuery if the conditional has evaluated to true, otherwise the elseQuery will run.

Procedure

apoc.agg

Qualified Name Type

apoc.agg.first(value Any) - returns the first value from the given collection.

Function

apoc.agg.graph(path Any) - returns all distinct nodes and relationships collected into a map with the keys nodes and relationships.

Function

apoc.agg.last(value Any) - returns the last value from the given collection.

Function

apoc.agg.maxItems(items Any, value Any, groupLimit Integer) - returns a map {items:[], value:n} where the value key is the maximum value present, and items represent all items with the same value. The size of the list of items can be limited to a given max size.

Function

apoc.agg.median(value Any) - returns the mathematical median for all non-null numeric values.

Function

apoc.agg.minItems(items Any, value Any, groupLimit Integer) - returns a map {items:[], value:n} where the value key is the minimum value present, and items represent all items with the same value. The size of the list of items can be limited to a given max size.

Function

apoc.agg.nth(value Any, offset Integer) - returns the nth value in the given collection (to fetch the last item of an unknown length collection, -1 can be used).

Function

apoc.agg.percentiles(value Number, percentiles [Float]) - returns the given percentiles over the range of numerical values in the given collection.

Function

apoc.agg.product(value Number) - returns the product of all non-null numerical values in the collection.

Function

apoc.agg.slice(value Any, from Integer, to Integer) - returns subset of non-null values from the given collection (the collection is considered to be zero-indexed). To specify the range from start until the end of the collection, the length should be set to -1.

Function

apoc.agg.statistics(value Number, percentiles [Float]) - returns the following statistics on the numerical values in the given collection: percentiles, min, minNonZero, max, total, mean, stdev.

Function

apoc.algo

Qualified Name Type

apoc.algo.aStar(startNode Node, endNode Node, relTypesAndDirections String, weightPropertyName String, latPropertyName String, lonPropertyName String) - runs the A* search algorithm to find the optimal path between two nodes, using the given relationship property name for the cost function.

Procedure

apoc.algo.aStarConfig(startNode Node, endNode Node, relTypesAndDirections String, config Map<String, Any>) - runs the A* search algorithm to find the optimal path between two nodes, using the given relationship property name for the cost function. This procedure looks for weight, latitude and longitude properties in the config.

Procedure

apoc.algo.allSimplePaths(startNode Node, endNode Node, relTypesAndDirections String, maxNodes Integer) - runs a search algorithm to find all of the simple paths between the given relationships, up to a max depth described by maxNodes. The returned paths will not contain loops.

Procedure

apoc.algo.cover(nodes Any) - returns all relationships between a given set of nodes.

Procedure

apoc.algo.dijkstra(startNode Node, endNode Node, relTypesAndDirections String, weightPropertyName String, defaultWeight Float, numberOfWantedPaths Integer) - runs Dijkstra’s algorithm using the given relationship property as the cost function.

Procedure

apoc.any

Qualified Name Type

apoc.any.isDeleted(object Any) - returns true if the given node or relationship no longer exists.

Function

apoc.any.properties(object Any, keys [String]) - returns all properties of the given object. The object can be a virtual node, a real node, a virtual relationship, a real relationship, or a map.

Function

apoc.any.property(object Any, key String) - returns the property for the given key from an object. The object can be a virtual node, a real node, a virtual relationship, a real relationship, or a map.

Function

apoc.atomic

Qualified Name Type

apoc.atomic.add(container Any, propertyName String, value Number, times Integer) - sets the given property to the sum of itself and the number value. The procedure then sets the property to the returned sum.

Procedure

apoc.atomic.concat(container Any, propertyName String, string String, times Integer) - sets the given property to the concatenation of itself and the string value. The procedure then sets the property to the returned string.

Procedure

apoc.atomic.insert(container Any, propertyName String, position Integer, value Any, times Integer) - inserts a value at position into the array value of a property. The procedure then sets the result back on the property.

Procedure

apoc.atomic.remove(container Any, propertyName String, position Integer, times Integer) - removes the element at position from the array value of a property. The procedure then sets the property to the resulting array value.

Procedure

apoc.atomic.subtract(container Any, propertyName String, number Number, times Integer) - sets the property of a value to itself minus the given number value. The procedure then sets the property to the returned sum.

Procedure

apoc.atomic.update(container Any, propertyName String, operation String, times Integer) - updates the value of a property with a Cypher operation.

Procedure

apoc.bitwise

Qualified Name Type

apoc.bitwise.op(a Integer, operator String, b Integer) - returns the result of the bitwise operation.

Function

apoc.coll

Qualified Name Type

apoc.coll.elements(coll [Any], limit Integer, offset Integer) - deconstructs a list of mixed types into identifiers indicating their specific type.

Procedure

apoc.coll.split(coll [Any], value Any) - splits a collection by the given value. The value itself will not be part of the resulting lists.

Procedure

apoc.coll.zipToRows apoc.coll.zipToRows(list1 [Any], list2 [Any]) - returns the two lists zipped together, with one row per zipped pair.

Procedure

apoc.coll.avg(coll [Number]) - returns the average of the numbers in the list.

Function

apoc.coll.combinations(coll [Any], minSelect Integer, maxSelect Integer) - returns a collection of all combinations of list elements between the selection size minSelect and maxSelect (default: minSelect).

Function

apoc.coll.contains(coll [Any], value Any) - returns whether or not the given value exists in the given collection (using a HashSet).

Function

apoc.coll.containsAll(coll1 [Any], coll2 [Any]) - returns whether or not all of the given values exist in the given collection (using a HashSet).

Function

apoc.coll.containsAllSorted(coll1 [Any], coll2 [Any]) - returns whether or not the given value exists in an already sorted collection (using a binary search).

Function

apoc.coll.containsDuplicates(coll [Any]) - returns true if a collection contains duplicate elements.

Function

apoc.coll.containsSorted(coll [Any], value Any) - returns whether or not the given value exists in an already sorted collection (using a binary search).

Function

apoc.coll.different(coll [Any]) - returns true if any of the values in the given list are different.

Function

apoc.coll.disjunction(list1 [Any], list2[Any]) - returns the disjunct set of two lists.

Function

apoc.coll.dropDuplicateNeighbors(list [Any]) - removes duplicate consecutive objects in the list.

Function

apoc.coll.duplicates(coll [Any]) - returns a list of duplicate items in the collection.

Function

apoc.coll.duplicatesWithCount(coll [Any]) - returns a list of duplicate items in the collection and their count, keyed by item and count.

Function

apoc.coll.fill(items String, count Integer) - returns a list with the given count of items.

Function

apoc.coll.flatten(coll [Any], recursive Boolean) - flattens the given list (to flatten nested lists, set recursive to true).

Function

apoc.coll.frequencies(coll [Any]) - returns a list of frequencies of the items in the collection, keyed by item and count.

Function

apoc.coll.frequenciesAsMap(coll [Any]) - returns a map of frequencies of the items in the collection, keyed by item and count.

Function

apoc.coll.indexOf(coll [Any], value Any) - returns the index for the first occurrence of the specified value in the list.

Function

apoc.coll.insert(coll [Any], index Integer, value Any) - inserts a value into the specified index in the list.

Function

apoc.coll.insertAll(coll [Any], index Integer, values Integer) - inserts all of the values into the list, starting at the specified index.

Function

apoc.coll.intersection(list1 [Any], list2[Any]) - returns the distinct intersection of two lists.

Function

apoc.coll.isEqualCollection(coll [Any], values [Any]) - returns true if the two collections contain the same elements with the same cardinality in any order (using a HashMap).

Function

apoc.coll.max(values [Any]) - returns the maximum of all values in the given list.

Function

apoc.coll.min(values [Any]) - returns the minimum of all values in the given list.

Function

apoc.coll.occurrences(coll [Any], item Any) - returns the count of the given item in the collection.

Function

apoc.coll.pairs(list [Any]) - returns a list of adjacent elements in the list ([1,2],[2,3],[3,null]).

Function

apoc.coll.pairsMin(list [Any]) - returns lists of adjacent elements in the list ([1,2],[2,3]), skipping the final element.

Function

apoc.coll.pairWithOffset(coll [Any], offset Integer) - returns a list of pairs defined by the offset.

Function

apoc.coll.partition(coll [Any], batchSize Integer) - partitions the original list into sub-lists of the given batch size. The final list may be smaller than the given batch size.

Function

apoc.coll.randomItem(coll [Any])- returns a random item from the list, or null on an empty or null list.

Function

apoc.coll.randomItems(coll [Any], itemCount Integer, allowRepick Boolean) - returns a list of itemCount random items from the original list (optionally allowing elements in the original list to be selected more than once).

Function

apoc.coll.remove(coll [Any], index Integer, length Integer) - removes a range of values from the list, beginning at position index for the given length of values.

Function

apoc.coll.removeAll(list1 [Any], list2 [Any]) - returns the first list with all elements of the second list removed.

Function

apoc.coll.runningTotal(list [Number]) - returns an accumulative array.

Function

apoc.coll.set(coll [Any], index Integer, value Any) - sets the element at the given index to the new value.

Function

apoc.coll.shuffle(coll [Any]) - returns the list shuffled.

Function

apoc.coll.sort(coll [Any]) - sorts the given list into ascending order.

Function

apoc.coll.sortMaps(list [Map<String, Any>], prop String) - sorts the given list into ascending order, based on the map property indicated by name.

Function

apoc.coll.sortMulti(coll [Map<String, Any>], orderFields [String], limit Integer, skip Integer) - sorts the given list of maps by the given fields. To indicate that a field should be sorted according to ascending values, prefix it with a caret (^). It is also possible to add limits to the list and to skip values.

Function

apoc.coll.sortNodes(coll [Node], prop String) - sorts the given list of nodes by their property into ascending order.

Function

apoc.coll.sortText(coll [String], conf Map<String, Any>) - sorts the given list of strings into ascending order.

Function

apoc.coll.stdev(list [Number], isBiasCorrected Boolean) - returns sample or population standard deviation with isBiasCorrected true or false respectively.

Function

apoc.coll.subtract(list1 [Any], list2 [Any]) - returns the first list as a set with all the elements of the second list removed.

Function

apoc.coll.sum(coll [Number]) - returns the sum of all the numbers in the list.

Function

apoc.coll.sumLongs(coll [Number]) - returns the sum of all the numbers in the list.

Function

apoc.coll.toSet(coll [Any]) - returns a unique list from the given list.

Function

apoc.coll.union(list1 [Any], list2 [Any]) - returns the distinct union of the two given lists.

Function

apoc.coll.unionAll(list1 [Any], list2 [Any]) - returns the full union of the two given lists (duplicates included).

Function

apoc.coll.zip(list1 [Any], list2 [Any]) - returns the two given lists zipped together as a list of lists.

Function

apoc.convert

Qualified Name Type

apoc.convert.setJsonProperty(node Node, key String, value Any) - serializes the given JSON object and sets it as a property on the given node.

Procedure

apoc.convert.toTree(paths [Path], lowerCaseRels Boolean, config Map<String, Any>) - returns a stream of maps, representing the given paths as a tree with at least one root.

Procedure

apoc.convert.fromJsonList(list [String], path String, pathOptions [String]) - converts the given JSON list into a Cypher list.

Function

apoc.convert.fromJsonMap(map String, path String, pathOptions [String]) - converts the given JSON map into a Cypher map.

Function

apoc.convert.getJsonProperty(node Node, key String, path String, pathOptions [String]) - converts a serialized JSON object from the property of the given node into the equivalent Cypher structure (e.g. map, list).

Function

apoc.convert.getJsonPropertyMap(node Node, key String, path String, pathOptions [String]) - converts a serialized JSON object from the property of the given node into a Cypher map.

Function

apoc.convert.toJson(value Any) - serializes the given JSON value.

Function

apoc.convert.toList(value Any) - converts the given value into a list.

Function

apoc.convert.toMap(map Any) - converts the given value into a map.

Function

apoc.convert.toNode(node Any) - converts the given value into a node.

Function

apoc.convert.toNodeList(list [Any]) - converts the given value into a list of nodes.

Function

apoc.convert.toRelationship(rel Any) - converts the given value into a relationship.

Function

apoc.convert.toRelationshipList(relList [Any]) - converts the given value into a list of relationships.

Function

apoc.convert.toSet(list [Any]) - converts the given value into a set.

Function

apoc.convert.toSortedJsonMap(value Any, ignoreCase Boolean) - converts a serialized JSON object from the property of a given node into a Cypher map.

Function

apoc.create

Qualified Name Type

apoc.create.addLabels(nodes Any, label [String]) - adds the given labels to the given nodes.

Procedure

apoc.create.clonePathToVirtual(path Path) - takes the given path and returns a virtual representation of it.

Procedure

apoc.create.clonePathsToVirtual(paths [Path]) - takes the given paths and returns a virtual representation of them.

Procedure

apoc.create.node(label [String], props Map<String, Any>) - creates a node with the given dynamic labels.

Procedure

apoc.create.nodes(label [String], props [Map<String, Any>]) - creates nodes with the given dynamic labels.

Procedure

apoc.create.relationship(from Node, relType String, props Map<String, Any>, to Node) - creates a relationship with the given dynamic relationship type.

Procedure

apoc.create.removeLabels(nodes Any, label [String]) - removes the given labels from the given node(s).

Procedure

apoc.create.removeProperties(nodes Any, keys [String]) - removes the given properties from the given node(s).

Procedure

apoc.create.removeRelProperties(rels Any, keys [String]) - removes the given properties from the given relationship(s).

Procedure

apoc.create.setLabels(nodes Any, label [String]) - sets the given labels to the given node(s). Non-matching labels are removed from the nodes.

Procedure

apoc.create.setProperties(nodes Any, keys [String], values [Any]) - sets the given properties to the given node(s).

Procedure

apoc.create.setProperty(nodes Any, key [String], value [Any]) - sets the given property to the given node(s).

Procedure

apoc.create.setRelProperties(rels Any, keys [String], values [Any]) - sets the given properties on the relationship(s).

Procedure

apoc.create.setRelProperty(rels Any, key String, value Any) - sets the given property on the relationship(s).

Procedure

apoc.create.uuids(count Integer) - returns a stream of UUIDs.

Procedure

apoc.create.vNode(label [String], props Map<String, Any>) - returns a virtual node.

Procedure

apoc.create.vNodes(label [String], props [Map<String, Any>]) - returns virtual nodes.

Procedure

apoc.create.vRelationship(from Node, relType String, props Map<String, Any>, to Node) - returns a virtual relationship.

Procedure

apoc.create.virtualPath(labelsN [String],n Map<String, Any>, relType String, props Map<String, Any>, labelsM [String], m Map<String, Any>) - returns a virtual path.

Procedure

apoc.create.uuid() - returns a UUID.

Function

apoc.create.uuidBase64() - returns a UUID encoded with base64.

Function

apoc.create.uuidBase64ToHex(base64Uuid String) - takes the given base64 encoded UUID and returns it as a hexadecimal string.

Function

apoc.create.uuidHexToBase64(uuid String) - takes the given UUID represented as a hexadecimal string and returns it encoded with base64.

Function

apoc.create.virtual.fromNode(node Node, propertyNames [String]) - returns a virtual node from the given existing node. The virtual node only contains the requested properties.

Function

apoc.create.vNode(label [String], props Map<String, Any>) - returns a virtual node.

Function

apoc.create.vRelationship(from Node, relType String, props Map<String, Any>, to Node) - returns a virtual relationship.

Function

apoc.cypher

Qualified Name Type

apoc.cypher.doIt(statement String, params Map<String, Any>) - runs a dynamically constructed string with the given parameters. This procedure allows for both read and write statements.

Procedure

apoc.cypher.run(statement String, params Map<String, Any>) - runs a dynamically constructed read-only string with the given parameters.

Procedure

apoc.cypher.runMany(statement String, params Map<String, Any>, config Map<String, Any>) - runs each semicolon separated statement and returns a summary of the statement outcomes.

Procedure

apoc.cypher.runManyReadOnly(statement String, params Map<String, Any>, config Map<String, Any>) - runs each semicolon separated read-only statement and returns a summary of the statement outcomes.

Procedure

apoc.cypher.runSchema(statement String, params Map<String, Any>) - runs the given query schema statement with the given parameters.

Procedure

apoc.cypher.runTimeboxed(statement String, params Map<String, Any>, timeout Integer) - terminates a Cypher statement if it has not finished before the set timeout (ms).

Procedure

apoc.cypher.runWrite(statement String, params Map<String, Any>) - alias for apoc.cypher.doIt.

Procedure

apoc.cypher.runFirstColumnMany(statement String, params Map<String, Any>) - runs the given statement with the given parameters and returns the first column collected into a list.

Function

apoc.data

Qualified Name Type

apoc.data.url(url String) - turns a URL into a map.

Function

apoc.date

Qualified Name Type

apoc.date.add(time Long, unit String, addValue Integer, addUnit String) - adds a unit of specified time to the given timestamp.

Function

apoc.date.convert(time Long, unit String, toUnit String) - converts the given timestamp from one time unit into a timestamp of a different time unit.

Function

apoc.date.convertFormat(temporal String, currentFormat String, convertTo String) - converts a string of one type of date format into a string of another type of date format.

Function

apoc.date.currentTimestamp() - returns the current Unix epoch timestamp in milliseconds.

Function

apoc.date.field(time Long, unit String, timezone String) - returns the value of one field from the given date time.

Function

apoc.date.fields(date String, pattern String) - splits the given date into fields returning a map containing the values of each field.

Function

apoc.date.format(time Long, unit String, format String, timezone String) - returns a string representation of the time value. The time unit (default: ms), date format (default: ISO), and time zone (default: current time zone) can all be changed.

Function

apoc.date.fromISO8601(time String) - converts the given date string (ISO8601) to an integer representing the time value in milliseconds.

Function

apoc.date.parse(time String, unit String, format String, timezone String) - parses the given date string from a specified format into the specified time unit.

Function

apoc.date.systemTimezone() - returns the display name of the system time zone (e.g. Europe/London).

Function

apoc.date.toISO8601(time Long, unit String) - returns a string representation of a specified time value in the ISO8601 format.

Function

apoc.date.toYears(value Any, format String) - converts the given timestamp or the given date into a floating point representing years.

Function

apoc.diff

Qualified Name Type

apoc.diff.nodes(leftNode Node, rightNode Node) - returns a list detailing the differences between the two given nodes.

Function

apoc.do

Qualified Name Type

apoc.do.case(conditionals [Any], elseQuery String, params Map<String, Any>) - for each pair of conditional queries in the given list, this procedure will run the first query for which the conditional is evaluated to true. If none of the conditionals are true, the ELSE query will run instead.

Procedure

apoc.do.when(condition Boolean, ifQuery String, elseQuery String, params Map<String, Any>) - runs the given read/write ifQuery if the conditional has evaluated to true, otherwise the elseQuery will run.

Procedure

apoc.example

Qualified Name Type

apoc.example.movies()- seeds the database with the Neo4j movie dataset.

Procedure

apoc.export

Qualified Name Type

apoc.export.arrow.all(file String, config Map<String, Any>) - exports the full database as an arrow file.

Procedure

apoc.export.arrow.graph(file String, graph Any, config Map<String, Any>) - exports the given graph as an arrow file.

Procedure

apoc.export.arrow.query(file String, query String, config Map<String, Any>) - exports the results from the given Cypher query as an arrow file.

Procedure

apoc.export.arrow.stream.all(config Map<String, Any>) - exports the full database as an arrow byte array.

Procedure

apoc.export.arrow.stream.graph(graph Any, config Map<String, Any>) - exports the given graph as an arrow byte array.

Procedure

apoc.export.arrow.stream.query(query String, config Map<String, Any>) - exports the given Cypher query as an arrow byte array.

Procedure

apoc.export.csv.all(file String, config Map<String, Any>) - exports the full database to the provided CSV file.

Procedure

apoc.export.csv.data(nodes [Node], rels [Rel], file String, config Map<String, Any>) - exports the given nodes and relationships to the provided CSV file.

Procedure

apoc.export.csv.graph(graph Map<String, Any>, file String, config Map<String, Any>) - exports the given graph to the provided CSV file.

Procedure

apoc.export.csv.query(query String, file String, config Map<String, Any>) - exports the results from running the given Cypher query to the provided CSV file.

Procedure

apoc.export.cypher.all(file String, config Map<String, Any>) - exports the full database (incl. indexes) as Cypher statements to the provided file (default: Cypher Shell).

Procedure

apoc.export.cypher.data(nodes [Node], rels [Rel], file String, config Map<String, Any>) - exports the given nodes and relationships (incl. indexes) as Cypher statements to the provided file (default: Cypher Shell).

Procedure

apoc.export.cypher.graph(graph Map<String, Any>, file String, config Map<String, Any>) - exports the given graph (incl. indexes) as Cypher statements to the provided file (default: Cypher Shell).

Procedure

apoc.export.cypher.query(statement String, file String, config Map<String, Any>) - exports the nodes and relationships from the given Cypher query (incl. indexes) as Cypher statements to the provided file (default: Cypher Shell).

Procedure

apoc.export.cypher.schema(file String, config Map<String, Any>) - exports all schema indexes and constraints to Cypher statements.

Procedure

apoc.export.graphml.all(file String, config Map<String, Any>) - exports the full database to the provided GraphML file.

Procedure

apoc.export.graphml.data(nodes [Node], rels [Rel], file String, config Map<String, Any>) - exports the given nodes and relationships to the provided GraphML file.

Procedure

apoc.export.graphml.graph(graph Map<String, Any>, file String, config Map<String, Any>) - exports the given graph to the provided GraphML file.

Procedure

apoc.export.graphml.query(statement String, file String, config Map<String, Any>) - exports the given nodes and relationships from the Cypher statement to the provided GraphML file.

Procedure

apoc.export.json.all(file String, config Map<String, Any>) - exports the full database to the provided JSON file.

Procedure

apoc.export.json.data(nodes [Node], rels [Rel], file String, config Map<String, Any>) - exports the given nodes and relationships to the provided JSON file.

Procedure

apoc.export.json.graph(graph Map<String, Any>, file String , config Map<String, Any>) - exports the given graph to the provided JSON file.

Procedure

apoc.export.json.query(statement String, file String, config Map<String, Any>) - exports the results from the Cypher statement to the provided JSON file.

Procedure

apoc.get

Qualified Name Type

`apoc.get.rels(rels Any) - returns all relationships with the given ids.

Procedure

apoc.graph

Qualified Name Type

apoc.graph.from(data Any, name String, props Map<String, Any>) - generates a virtual sub-graph by extracting all of the nodes and relationships from the given data.

Procedure

apoc.graph.fromCypher(statement String, params Map<String, Any>, name String, props Map<String, Any>) - generates a virtual sub-graph by extracting all of the nodes and relationships from the data returned by the given Cypher statement.

Procedure

apoc.graph.fromData(nodes [Node], rels [Rel], name String, props Map<String, Any>) - generates a virtual sub-graph by extracting all of the nodes and relationships from the given data.

Procedure

apoc.graph.fromDB(name String, props Map<String, Any>) - generates a virtual sub-graph by extracting all of the nodes and relationships from the data returned by the given database.

Procedure

apoc.graph.fromDocument(json Any, config Map<String, Any>) - generates a virtual sub-graph by extracting all of the nodes and relationships from the data returned by the given JSON file.

Procedure

apoc.graph.fromPath(path Path, name String, props String) - generates a virtual sub-graph by extracting all of the nodes and relationships from the data returned by the given path.

Procedure

apoc.graph.fromPaths(paths [Path], name String, props Map<String, Any>) - generates a virtual sub-graph by extracting all of the nodes and relationships from the data returned by the given paths.

Procedure

apoc.graph.validateDocument(json Any, config Map<String, Any>) - validates the JSON file and returns the result of the validation.

Procedure

apoc.hashing

Qualified Name Type

apoc.hashing.fingerprint(object Any, excludedPropertyKeys [String]) - calculates a MD5 checksum over a node or a relationship (identical entities share the same checksum). Unsuitable for cryptographic use-cases.

Function

apoc.hashing.fingerprinting(object Any, config Map<String, Any>) - calculates a MD5 checksum over a node or a relationship (identical entities share the same checksum). Unlike apoc.hashing.fingerprint(), this function supports a number of config parameters. Unsuitable for cryptographic use-cases.

Function

apoc.hashing.fingerprintGraph(propertyExcludes [String]) - calculates a MD5 checksum over the full graph. This function uses in-memory data structures. Unsuitable for cryptographic use-cases.

Function

apoc.import

Qualified Name Type

apoc.import.csv(nodes [Map<String, Any>], rels [Map<String, Any>], config Map<String, Any>) - imports nodes and relationships with the given labels and types from the provided CSV file.

Procedure

apoc.import.graphml(urlOrBinaryFile Any, config Map<String, Any>) - imports a graph from the provided GraphML file.

Procedure

apoc.import.json(urlOrBinaryFile Any, config Map<String, Any>) - imports a graph from the provided JSON file.

Procedure

apoc.import.xml(urlOrBinary Any, config Map<String, Any>) - imports a graph from the provided XML file.

Procedure

apoc.json

Qualified Name Type

apoc.json.path(json String, path String, pathOptions [String]) - returns the given JSON path.

Function

apoc.label

Qualified Name Type

apoc.label.exists(node Any, label String) - returns true or false depending on whether or not the given label exists.

Function

apoc.load

Qualified Name Type

apoc.load.arrow(file String, config Map<String, Any>) - imports nodes and relationships from the provided arrow file.

Procedure

apoc.load.arrow.stream(source ByteArray, config Map<String, Any>) - imports nodes and relationships from the provided arrow byte array.

Procedure

apoc.load.json(urlOrKeyOrBinary Any, path String, config Map<String, Any>) - imports JSON file as a stream of values if the given JSON file is an array. If the given JSON file is a map, this procedure imports a single value instead.

Procedure

apoc.load.jsonArray(url String, path String, config Map<String, Any>) - loads array from a JSON URL (e.g. web-API) to then import the given JSON file as a stream of values.

Procedure

apoc.load.jsonParams(urlOrKeyOrBinary Any, headers Map<String, Any>, payload String, config Map<String, Any>) - loads parameters from a JSON URL (e.g. web-API) as a stream of values if the given JSON file is an array. If the given JSON file is a map, this procedure imports a single value instead.

Procedure

apoc.load.xml(urlOrBinary Any, path String, config Map<String, Any>, simple Boolean) - loads a single nested map from an XML URL (e.g. web-API).

Procedure

apoc.lock

Qualified Name Type

apoc.lock.all(nodes [Node], rels [Rel]) - acquires a write lock on the given nodes and relationships.

Procedure

apoc.lock.nodes(nodes [Node]) - acquires a write lock on the given nodes.

Procedure

apoc.lock.read.nodes(nodes [Node]) - acquires a read lock on the given nodes.

Procedure

apoc.lock.read.rels(rels [Rel]) - acquires a read lock on the given relationships.

Procedure

apoc.lock.rels(rels [Rels]) - acquires a write lock on the given relationships.

Procedure

apoc.log

Qualified Name Type

apoc.log.stream(path String, config Map<String, Any>) - returns the file contents from the given log, optionally returning only the last n lines. This procedure requires users to have an admin role.

Procedure

apoc.map

Qualified Name Type

apoc.map.clean(map Map<String, Any>, keys [String], values [Any]) - filters the keys and values contained in the given lists.

Function

apoc.map.flatten(map Map<String, Any>, delimiter String) - flattens nested items in the given map. This function is the reverse of the apoc.map.unflatten function.

Function

apoc.map.fromLists(keys [String], values [Any]) - creates a map from the keys and values in the given list.

Function

apoc.map.fromNodes(label String, prop String) - creates a map from the labels and properties of the given nodes.

Function

apoc.map.fromPairs(pairs [[key Any, value Any]]) - creates a map from the given list of key-value pairs.

Function

apoc.map.fromValues(values [Any]) - creates a map from the alternating keys and values in the given list.

Function

apoc.map.get(map Map<String, Any>, key String, value Any, fail Boolean) - returns a value for the given key. If the given key does not exist, or lacks a default value, this function will throw an exception.

Function

apoc.map.groupBy(values [Any], key String) - creates a map of the list keyed by the given property, with single values.

Function

apoc.map.groupByMulti(values [Any], key String) - creates a map of the lists keyed by the given property, with the list values.

Function

apoc.map.merge(map1 Map<String, Any>, map2 Map<String, Any>) - merges the two given maps into one map.

Function

apoc.map.mergeList(maps [Map<String, Value>]) - merges all maps in the given list into one map.

Function

apoc.map.mget(map Map<String, Any>, keys [String], values [Any], fail Boolean) - returns a list of values for the given keys. If one of the keys does not exist, or lacks a default value, this function will throw an exception.

Function

apoc.map.removeKey(map Map<String, Any>, key String, config Map<String, Any>) - removes the given key from the map (recursively if recursive is true).

Function

apoc.map.removeKeys(map Map<String, Any>, keys [String], config Map<String, Any>) - removes the given keys from the map (recursively if recursive is true).

Function

apoc.map.setEntry(map Map<String, Any>, key String, value Any) - adds or updates the given entry in the map.

Function

apoc.map.setKey(map Map<String, Any>, key String, value Any) - adds or updates the given entry in the map.

Function

apoc.map.setLists(map Map<String, Any>, keys [String], values [Any]) - adds or updates the given keys/value pairs provided in list format (e.g. [key1, key2],[value1, value2]) in a map.

Function

apoc.map.setPairs(map Map<String, Any>, pairs [[key Any, value Any]]) - adds or updates the given key/value pairs (e.g. [key1,value1],[key2,value2]) in a map.

Function

apoc.map.setValues(map Map<String, Any>, pairs [[key Any, value Any]]) - adds or updates the alternating key/value pairs (e.g. [key1,value1,key2,value2]) in a map.

Function

apoc.map.sortedProperties(map Map<String, Any>, ignoreCase Boolean) - returns a list of key/value pairs in a list. The pairs are sorted by alphabetically by key, with optional case sensitivity.

Function

apoc.map.submap(map Map, keys [String], values [Any], fail Boolean) - returns a sub-map for the given keys. If one of the keys does not exist, or lacks a default value, this function will throw an exception.

Function

apoc.map.unflatten(map Map<String, Any>, delimiter String) - unflattens items in the given map to nested items. This function is the reverse of the apoc.map.flatten function.

Function

apoc.map.updateTree(tree Map<String, Any>, key String, data [[key Any, value Any]])- adds the data map on each level of the nested tree, where the key-value pairs match.

Function

apoc.map.values(map Map<String, Any>, keys [String], addNullsForMissing Boolean) - returns a list of values indicated by the given keys (returns a null value if a given key is missing).

Function

apoc.math

Qualified Name Type

apoc.math.regr(label String, propertyY String, propertyX String) - returns the coefficient of determination (R-squared) for the values of propertyY and propertyX in the given label.

Procedure

apoc.math.cosh(value Float) - returns the hyperbolic cosine.

Function

apoc.math.coth(value Float) - returns the hyperbolic cotangent.

Function

apoc.math.csch(value Float) - returns the hyperbolic cosecant.

Function

apoc.math.maxByte() - returns the maximum value of a byte.

Function

apoc.math.maxDouble() - returns the largest positive finite value type double.

Function

apoc.math.maxInt() - returns the maximum value of an integer.

Function

apoc.math.maxLong() - returns the maximum value of a long.

Function

apoc.math.minByte() - returns the minimum value of a byte.

Function

apoc.math.minDouble() - returns the smallest positive non-zero value of type double.

Function

apoc.math.minInt() - returns the minimum value of an integer.

Function

apoc.math.minLong() - returns the minimum value of a long.

Function

apoc.math.sech(value Float) - returns the hyperbolic secant of the given value.

Function

apoc.math.sigmoid(value Float) - returns the sigmoid of the given value.

Function

apoc.math.sigmoidPrime(value Float) - returns the sigmoid prime [ sigmoid(val) * (1 - sigmoid(val)) ] of the given value.

Function

apoc.math.sinh(value Float) - returns the hyperbolic sine of the given value.

Function

apoc.math.tanh(value Float) - returns the hyperbolic tangent of the given value.

Function

apoc.merge

Qualified Name Type

apoc.merge.node(label [String], identProps Map<String, Any>, props Map<String, Any>, onMatchProps Map<String, Any>) - merges the given node(s) with the given dynamic labels.

Procedure

apoc.merge.node.eager(label [String], identProps Map<String, Any>, props Map<String, Any>, onMatchProps Map<String, Any>) - merges the given node(s) with the given dynamic labels eagerly.

Procedure

apoc.merge.nodeWithStats(label [String], identProps Map<String, Any>, props Map<String, Any>, onMatchProps Map<String, Any>) - merges the given node(s) with the given dynamic labels. Provides queryStatistics in the result.

Procedure

apoc.merge.nodeWithStats.eager(label [String], identProps Map<String, Any>, props Map<String, Any>, onMatchProps Map<String, Any>) - merges the given node(s) with the given dynamic labels eagerly. Provides queryStatistics in the result.

Procedure

apoc.merge.relationship(startNode Node, relType String, identProps Map<String, Any>, props Map<String, Any>, endNode Node, onMatchProps Map<String, Any>) - merges the given relationship(s) with the given dynamic types/properties.

Procedure

apoc.merge.relationship.eager(startNode Node, relType String, identProps Map<String, Any>, props Map<String, Any>, endNode Node, onMatchProps Map<String, Any>) - merges the given relationship(s) with the given dynamic types/properties eagerly.

Procedure

apoc.merge.relationshipWithStats(startNode Node, relType String, identProps Map<String, Any>, props Map<String, Any>, endNode Node, onMatchProps Map<String, Any>) - merges the given relationship(s) with the given dynamic types/properties. Provides queryStatistics in the result.

Procedure

apoc.merge.relationshipWithStats.eager(startNode Node, relType String, identProps Map<String, Any>, props Map<String, Any>, endNode Node, onMatchProps Map<String, Any>) - merges the given relationship(s) with the given dynamic types/properties eagerly. Provides queryStatistics in the result.

Procedure

apoc.meta

Qualified Name Type

apoc.meta.data(config Map<String, Any>) - examines the given graph and returns a table of metadata.

Procedure

apoc.meta.data.of(graph Any, config Map<String, Any>) - examines the given sub-graph and returns a table of metadata.

Procedure

apoc.meta.graph(config Map<String, Any>) - examines the given graph and returns a meta-graph.

Procedure

apoc.meta.graph.of(graph Any, config Map<String, Any>) - examines the given sub-graph and returns a meta-graph.

Procedure

apoc.meta.graphSample(config Map<String, Any>) - examines the given graph and returns a meta-graph. Unlike apoc.meta.graph, this procedure does not filter away non-existing paths.

Procedure

apoc.meta.nodeTypeProperties(config Map<String, Any>) - examines the given graph and returns a table of metadata with information about the nodes therein.

Procedure

apoc.meta.relTypeProperties(config Map<String, Any>) - examines the given graph and returns a table of metadata with information about the relationships therein.

Procedure

apoc.meta.schema(config Map<String, Any>) - examines the given sub-graph and returns metadata as a map.

Procedure

apoc.meta.stats() - returns the metadata stored in the transactional database statistics.

Procedure

apoc.meta.subGraph(config Map<String, Any>) - examines the given sub-graph and returns a meta-graph.

Procedure

apoc.meta.cypher.isType(value Any, type String) - returns true if the given value matches the given type.

Function

apoc.meta.cypher.type(value Any) - returns the type name of the given value.

Function

apoc.meta.cypher.types(props Any) - returns a map containing the type names of the given values.

Function

apoc.meta.nodes.count(nodes [String], config Map<String, Any>) - returns the sum of the nodes with the given labels in the list.

Function

apoc.neighbors

Qualified Name Type

apoc.neighbors.athop(node Node, relTypes String, distance Integer) - returns all nodes connected by the given relationship types at the specified distance.

Procedure

apoc.neighbors.athop.count(node Node, relTypes String, distance Integer) - returns the count of all nodes connected by the given relationship types at the specified distance.

Procedure

apoc.neighbors.byhop(node Node, relTypes String, distance Integer) - returns all nodes connected by the given relationship types within the specified distance. Returns lists of nodes, where each path of nodes represents one row of lists.

Procedure

apoc.neighbors.byhop.count(node Node, relTypes String, distance Integer) - returns the count of all nodes connected by the given relationship types within the specified distance.

Procedure

apoc.neighbors.tohop(node Node, relTypes String, distance Integer) - returns all nodes connected by the given relationship types within the specified distance. Nodes are returned individually for each row.

Procedure

apoc.neighbors.tohop.count(node Node, relTypes String, distance Integer) - returns the count of all nodes connected by the given relationships in the pattern within the specified distance.

Procedure

apoc.node

Qualified Name Type

apoc.node.degree(node Node, relTypes String) - returns the total degrees for the given node.

Function

apoc.node.degree.in(node Node, relTypes String) - returns the total number of incoming relationships to the given node.

Function

apoc.node.degree.out(node Node, relTypes String) - returns the total number of outgoing relationships from the given node.

Function

apoc.node.id(node Node) - returns the id for the given virtual node.

Function

apoc.node.labels(node Node) - returns the labels for the given virtual node.

Function

apoc.node.relationship.exists(node Node, relTypes String) - returns a boolean based on whether the given node has a relationship (or whether the given node has a relationship of the given type and direction).

Function

apoc.node.relationship.types(node Node, relTypes String) - returns a list of distinct relationship types for the given node.

Function

apoc.node.relationships.exist(node Node, relTypes String)s - returns a boolean based on whether the given node has relationships (or whether the given nodes has relationships of the given type and direction).

Function

apoc.nodes

Qualified Name Type

apoc.nodes.collapse(nodes [Node], config Map<String, Any>) - merges nodes together in the given list. The nodes are then combined to become one node, with all labels of the previous nodes attached to it, and all relationships pointing to it.

Procedure

apoc.nodes.cycles(nodes [Node], config Map<String, Any>) - detects all path cycles in the given node list. This procedure can be limited on relationships as well.

Procedure

apoc.nodes.delete(nodes Any, batchSize Integer) - deletes all nodes with the given ids.

Procedure

apoc.nodes.get(nodes Any) - returns all nodes with the given ids.

Procedure

apoc.nodes.group(labels [String], groupByProperties [String], aggregations [Map<String, Any>], config Map<String, Any>) - allows for the aggregation of nodes based on the given properties. This procedure returns virtual nodes.

Procedure

apoc.nodes.link(nodes [Node], type String, config Map<String, Any>) - creates a linked list of the given nodes connected by the given relationship type.

Procedure

apoc.nodes.rels(rels Any) - returns all relationships with the given ids.

Procedure

apoc.nodes.connected(startNode Node, endNode Node, types String) - returns true when a given node is directly connected to another given node. This function is optimized for dense nodes.

Function

apoc.nodes.isDense(node Node) - returns true if the given node is a dense node.

Function

apoc.nodes.relationship.types(nodes Any, types String) - returns a list of distinct relationship types from the given list of nodes.

Function

apoc.nodes.relationships.exist(nodes Any, types String) - returns a boolean based on whether or not the given nodes have the given relationships.

Function

apoc.number

Qualified Name Type

apoc.number.arabicToRoman(number Any) - converts the given Arabic numbers to Roman numbers.

Function

apoc.number.exact.add(stringA String, stringB String) - returns the sum of adding the two given large numbers (using Java BigDecimal).

Function

apoc.number.exact.div(stringA String, stringB String, precision Integer, roundingMode String) - returns the sum of dividing a given large number with another given large number (using Java BigDecimal).

Function

apoc.number.exact.mul(stringA String, stringB String, precision Integer, roundingMode String) - returns the sum of multiplying two given large numbers (using Java BigDecimal).

Function

apoc.number.exact.sub(stringA String, stringB String) - returns the sum of subtracting a given large number from another given large number (using Java BigDecimal).

Function

apoc.number.exact.toExact(number Integer) - returns the exact value of the given number (using Java BigDecimal).

Function

apoc.number.exact.toFloat(string String, precision Integer, roundingMode String) - returns the float value of the given large number (using Java BigDecimal).

Function

apoc.number.exact.toInteger(string String, precision Integer, roundingMode String) - returns the integer value of the given large number (using Java BigDecimal).

Function

apoc.number.format(number Any, pattern String, language String) - formats the given long or double using the default system pattern and language to produce a string.

Function

apoc.number.parseFloat(text String, pattern String, language String) - parses the given string using the default system pattern and language to produce a double.

Function

apoc.number.parseInt(text String, pattern String, language String) - parses the given string using the default system pattern and language to produce a long.

Function

apoc.number.romanToArabic(romanNumber String) - converts the given Roman numbers to Arabic numbers.

Function

apoc.path

Qualified Name Type

apoc.path.expand(startNode Any, relFilter String, labelFilter String, minDepth Integer, maxDepth Integer) - returns paths expanded from the start node following the given relationship types from min-depth to max-depth.

Procedure

apoc.path.expandConfig(startNode Any, config Map<String, Any>) - returns paths expanded from the start node the given relationship types from min-depth to max-depth.

Procedure

apoc.path.spanningTree(startNode Any, config Map<String, Any>) - returns spanning tree paths expanded from the start node following the given relationship types to max-depth.

Procedure

apoc.path.subgraphAll(startNode Any, config Map<String, Any>) - returns the sub-graph reachable from the start node following the given relationship types to max-depth.

Procedure

apoc.path.subgraphNodes(startNode Any, config Map<String, Any>) - returns the nodes in the sub-graph reachable from the start node following the given relationship types to max-depth.

Procedure

apoc.path.combine(path1 Path, path2 Path) - combines the two given paths into one path.

Function

apoc.path.create(startNode Node, rels [Rel]) - returns a path from the given start node and a list of relationships.

Function

apoc.path.elements(path Path) - converts the given path into a list of nodes and relationships.

Function

apoc.path.slice(path Path, offset Integer, length Integer) - returns a sub-path of the given length and offset from the given path.

Function

apoc.periodic

Qualified Name Type

apoc.periodic.cancel(name String) - cancels the given background job. Background jobs are created using apoc.periodic.submit.

Procedure

apoc.periodic.commit(statement String, params Map<String, Any>) - runs the given statement in separate batched transactions.

Procedure

apoc.periodic.countdown(name String, statement String, rate Integer) - runs a repeatedly called background statement until it returns 0.

Procedure

apoc.periodic.iterate(cypherIterate String, cypherAction String, config Map<String, Any>) - runs the second statement for each item returned by the first statement. This procedure returns the number of batches and the total number of processed rows.

Procedure

apoc.periodic.list() - returns a list of all background jobs.

Procedure

apoc.periodic.repeat(name String, statement String, rate Integer, config Map<String, Any>) - runs a repeatedly called background job. To stop this procedure, use apoc.periodic.cancel.

Procedure

apoc.periodic.submit(name String, statement String, params Map<String, Any>) - creates a background job which runs the given Cypher statement once.

Procedure

apoc.periodic.truncate(config Map<String, Any>) - removes all entities (and optionally indexes and constraints) from the database using the apoc.periodic.iterate procedure.

Procedure

apoc.refactor

Qualified Name Type

apoc.refactor.categorize(sourceKey String, type String, outgoing Boolean, label String, targetKey String, copiedKeys [String], batchSize Integer) - creates new category nodes from nodes in the graph with the specified sourceKey as one of its property keys. The new category nodes are then connected to the original nodes with a relationship of the given type.

Procedure

apoc.refactor.cloneNodes(nodes [Node], withRelationships Boolean, skipProperties [String]) - clones the given nodes with their labels and properties. It is possible to skip any node properties using skipProperties (note: this only skips properties on nodes and not their relationships).

Procedure

apoc.refactor.cloneSubgraph(nodes [Node], rels [Rel], config Map<String, Any>) - clones the given nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clones the given relationships. If no relationships are provided, all existing relationships between the given nodes will be cloned.

Procedure

apoc.refactor.cloneSubgraphFromPaths(paths [Path], config Map<String, Any>) - clones a sub-graph defined by the given list of paths. It is possible to skip any node properties using the skipProperties list via the config map.

Procedure

apoc.refactor.collapseNode(nodes Any, relType String) - collapses the given node and replaces it with a relationship of the given type.

Procedure

apoc.refactor.deleteAndReconnect(path Path, nodes [Node], config Map<String, Any>) - removes the given nodes from the path and reconnects the remaining nodes.

Procedure

apoc.refactor.extractNode(rels Any, labels [String], outType String, inType String) - expands the given relationships into intermediate nodes. The intermediate nodes are connected by the given 'OUT' and 'IN' types.

Procedure

apoc.refactor.from(rel Rel, newNode Node) - redirects the given relationship to the given start node.

Procedure

apoc.refactor.invert(rel Rel) - inverts the direction of the given relationship.

Procedure

apoc.refactor.mergeNodes(nodes [Node], config Map<String, Any>) - merges the given list of nodes onto the first node in the list. All relationships are merged onto that node as well.

Procedure

apoc.refactor.mergeRelationships(rels [Rel], config Map<String, Any>) - merges the given list of relationships onto the first relationship in the list.

Procedure

apoc.refactor.normalizeAsBoolean(entity Any, propertyKey String, trueValues [Any], falseValues [Any]) - refactors the given property to a boolean.

Procedure

apoc.refactor.rename.label(oldLabel String, newLabel String, nodes [Node]) - renames the given label from 'oldLabel' to 'newLabel' for all nodes. If a list of nodes is provided, the renaming is applied to the nodes within this list only.

Procedure

apoc.refactor.rename.nodeProperty(oldName String, newName String, nodes [Node], config Map<String, Any>) - renames the given property from 'oldName' to 'newName' for all nodes. If a list of nodes is provided, the renaming is applied to the nodes within this list only.

Procedure

apoc.refactor.rename.type(oldType String, newType String, rels [Rel], config Map<String, Any>) - renames all relationships with type 'oldType' to 'newType'. If a list of relationships is provided, the renaming is applied to the relationships within this list only.

Procedure

apoc.refactor.rename.typeProperty(oldName String, newName String, rels [Rel], config Map<String, Any>) - renames the given property from 'oldName' to 'newName' for all relationships. If a list of relationships is provided, the renaming is applied to the relationships within this list only.

Procedure

apoc.refactor.setType(rel Rel, newType String) - changes the type of the given relationship.

Procedure

apoc.refactor.to(rel Rel, endNode Node) - redirects the given relationship to the given end node.

Procedure

apoc.rel

Qualified Name Type

apoc.rel.endNode(rel Rel) - returns the end node for the given virtual relationship.

Function

apoc.rel.id(rel Rel) - returns the id for the given virtual relationship.

Function

apoc.rel.startNode(rel Rel) - returns the start node for the given virtual relationship.

Function

apoc.rel.type(rel Rel) - returns the type for the given virtual relationship.

Function

apoc.schema

Qualified Name Type

apoc.schema.assert(indexes Map<String, [Any]>, constraints Map<String, [Any]>, dropExisting Boolean) - drops all other existing indexes and constraints when dropExisting is true (default is true). Asserts at the end of the operation that the given indexes and unique constraints are there.

Procedure

apoc.schema.nodes(config Map<String, Any>) - returns all indexes and constraints information for all node labels in the database. It is possible to define a set of labels to include or exclude in the config parameters.

Procedure

apoc.schema.properties.distinct(label String, key String) - returns all distinct node property values for the given key.

Procedure

apoc.schema.properties.distinctCount(label String, key String) - returns all distinct property values and counts for the given key.

Procedure

apoc.schema.relationships(config Map<String, Any>) - returns the indexes and constraints information for all the relationship types in the database. It is possible to define a set of relationship types to include or exclude in the config parameters.

Procedure

apoc.schema.node.constraintExists(labelName String, propertyName [String]) - returns a boolean depending on whether or not a constraint exists for the given node label with the given property names.

Function

apoc.schema.node.indexExists(labelName String, propertyName [String]) - returns a boolean depending on whether or not an index exists for the given node label with the given property names.

Function

apoc.schema.relationship.constraintExists(type String, propertyName [String]) - returns a boolean depending on whether or not a constraint exists for the given relationship type with the given property names.

Function

apoc.schema.relationship.indexExists(type String, propertyName [String])- returns a boolean depending on whether or not an index exists for the given relationship type with the given property names.

Function

apoc.scoring

Qualified Name Type

apoc.scoring.existence(score Integer, exists Boolean) - returns the given score if true, 0 if false.

Function

apoc.scoring.pareto(minimumThreshold Integer, eightyPercentValue Integer, maximumValue Integer, score Integer) - applies a Pareto scoring function over the given integers.

Function

Qualified Name Type

apoc.search.multiSearchReduced(labelPropertyMap Any, operator String, value String) - returns a reduced representation of the nodes found after a parallel search over multiple indexes. The reduced node representation includes: node id, node labels and the searched properties.

Procedure

apoc.search.node(labelPropertyMap Any, operator String, value String) - returns all the distinct nodes found after a parallel search over multiple indexes.

Procedure

apoc.search.nodeAll(labelPropertyMap Any, operator String, value String) - returns all the nodes found after a parallel search over multiple indexes.

Procedure

apoc.search.nodeAllReduced(labelPropertyMap Any, operator String, value String) - returns a reduced representation of the nodes found after a parallel search over multiple indexes. The reduced node representation includes: node id, node labels and the searched properties.

Procedure

apoc.spatial

Qualified Name Type

apoc.spatial.geocode(location String, maxResults Integer, quotaException Boolean, config Map<String, Any>)) - returns the geographic location (latitude, longitude, and description) of the given address using a geocoding service (default: OpenStreetMap).

Procedure

apoc.spatial.geocodeOnce(location String, config Map<String, Any>) - returns the geographic location (latitude, longitude, and description) of the given address using a geocoding service (default: OpenStreetMap). This procedure returns at most one result.

Procedure

apoc.spatial.reverseGeocode(latitude Float, longitude Float, quotaException Boolean, config Map<String, Any>) - returns a textual address from the given geographic location (latitude, longitude) using a geocoding service (default: OpenStreetMap). This procedure returns at most one result.

Procedure

apoc.spatial.sortByDistance(paths [Path]) - sorts the given collection of paths by the sum of their distance based on the latitude/longitude values on the nodes.

Procedure

apoc.stats

Qualified Name Type

apoc.stats.degrees(relTypes String) - returns the percentile groupings of the degrees on the nodes connected by the given relationship types.

Procedure

apoc.temporal

Qualified Name Type

apoc.temporal.format(temporal Any, format String) - formats the given temporal value into the given time format.

Function

apoc.temporal.formatDuration(input Any, format String) - formats the given duration into the given time format.

Function

apoc.temporal.toZonedTemporal(time String, format String, timezone String) - parses the given date string using the specified format into the given time zone.

Function

apoc.text

Qualified Name Type

apoc.text.phoneticDelta(text1 String, text2 String) - returns the US_ENGLISH soundex character difference between the two given strings.

Procedure

apoc.text.base64Decode(text String) - decodes the given Base64 encoded string.

Function

apoc.text.base64Encode(text String) - encodes the given string with Base64.

Function

apoc.text.base64UrlDecode(url String) - decodes the given Base64 encoded URL.

Function

apoc.text.base64UrlEncode(url String) - encodes the given URL with Base64.

Function

apoc.text.byteCount(text String, charset String) - returns the size of the given string in bytes.

Function

apoc.text.bytes(text String, charset String) - returns the give string as bytes.

Function

apoc.text.camelCase(text String) - converts the given string to camel case.

Function

apoc.text.capitalize(text String) - capitalizes the first letter of the given string.

Function

apoc.text.capitalizeAll(text String) - capitalizes the first letter of every word in the given string.

Function

apoc.text.charAt(text String, index Integer) - returns the long value of the character at the given index.

Function

apoc.text.clean(text String) - strips the given string of everything except alpha numeric characters and converts it to lower case.

Function

apoc.text.code(codepoint Long) - converts the long value into a string.

Function

apoc.text.compareCleaned(text1 String, text2 String) - compares two given strings stripped of everything except alpha numeric characters converted to lower case.

Function

apoc.text.decapitalize(text String) - turns the first letter of the given string from upper case to lower case.

Function

apoc.text.decapitalizeAll(text String) - turns the first letter of every word in the given string to lower case.

Function

apoc.text.distance(text1 String, text2 String) - compares the two given strings using the Levenshtein distance algorithm.

Function

apoc.text.doubleMetaphone(value String) - returns the double metaphone phonetic encoding of all words in the given string value.

Function

apoc.text.format(text String, params [Any], language String) - formats the given string with the given parameters.

Function

apoc.text.fuzzyMatch(text1 String, text2 String) - performs a fuzzy match search of the two given strings.

Function

apoc.text.hammingDistance(text1 String, text2 String) - compares the two given strings using the Hamming distance algorithm.

Function

apoc.text.hexCharAt(text String, index Integer) - returns the hexadecimal value of the given string at the given index.

Function

apoc.text.hexValue(value Integer) - returns the hexadecimal value of the given value.

Function

apoc.text.indexOf(text String, lookup String, from Integer, to Integer) - returns the first occurrence of the lookup string in the given string, or -1 if not found.

Function

apoc.text.indexesOf(text String, lookup String, from Integer, to Integer) - returns all occurences of the lookup string in the given string, or an empty list if not found.

Function

apoc.text.jaroWinklerDistance(text1 String, text2 String) - compares the two given strings using the Jaro-Winkler distance algorithm.

Function

apoc.text.join(texts [String], delimiter String) - joins the given strings using the given delimiter.

Function

apoc.text.levenshteinDistance(text1 String, text2 String) - compares the given strings using the Levenshtein distance algorithm.

Function

apoc.text.levenshteinSimilarity(text1 String, text2 String) - returns the similarity (a value within 0 and 1) between the two given strings based on the Levenshtein distance algorithm.

Function

apoc.text.lpad(text String, count Integer, delimiter String) - left pads the given string by the given width.

Function

apoc.text.phonetic(text String) - returns the US_ENGLISH phonetic soundex encoding of all words of the string.

Function

apoc.text.random(length Integer, valid String) - generates a random string to the given length using a length parameter and an optional string of valid characters.

Function

apoc.text.regexGroups(text String, regex String) - returns all groups matching the given regular expression in the given text.

Function

apoc.text.regreplace(text String, regex String, replacement String) - finds and replaces all matches found by the given regular expression with the given replacement.

Function

apoc.text.repeat(item String, count Integer) - returns the result of the given item multiplied by the given count.

Function

apoc.text.replace(text String, regex String, replacement String) - finds and replaces all matches found by the given regular expression with the given replacement.

Function

apoc.text.rpad(text String, count Integer, delimiter String) - right pads the given string by the given width.

Function

apoc.text.slug(text String, delimiter String) - replaces the whitespace in the given string with the given delimiter.

Function

apoc.text.snakeCase(text String) - converts the given string to snake case.

Function

apoc.text.sorensenDiceSimilarityWithLanguage(text1 String, text2 String, languageTag String) - compares the two given strings using the Sørensen–Dice coefficient formula, with the provided IETF language tag.

Function

apoc.text.split(text String, regex String, limit Integer) - splits the given string using a given regular expression as a separator.

Function

apoc.text.swapCase(text String) - swaps the cases in the given string.

Function

apoc.text.toCypher(value Any, config Map<String, Any>) - converts the given value to a Cypher property string.

Function

apoc.text.toUpperCase(text String) - converts the given string to upper case.

Function

apoc.text.upperCamelCase(text String) - converts the given string to upper camel case.

Function

apoc.text.urldecode(text String) - decodes the given URL encoded string.

Function

apoc.text.urlencode(text String) - encodes the given URL string.

Function

apoc.trigger

Qualified Name Type

apoc.trigger.add(name String, statement String, selector Map<String, Any>, config Map<String, Any>) - adds a trigger to the given Cypher statement. The selector for this procedure is {phase:'before/after/rollback/afterAsync'}.

Procedure

apoc.trigger.list() - lists all installed triggers.

Procedure

apoc.trigger.pause(name String) - pauses the given trigger.

Procedure

apoc.trigger.remove(name String) - removes the given trigger.

Procedure

apoc.trigger.removeAll() - removes all previously added triggers.

Procedure

apoc.trigger.resume(name String) - resumes the given paused trigger.

Procedure

apoc.util

Qualified Name Type

apoc.util.sleep(duration Integer) - causes the currently running Cypher to sleep for the given duration of milliseconds (the transaction termination is honored).

Procedure

apoc.util.validate(predicate Boolean, message String, params [Any]) - if the given predicate is true an exception is thrown.

Procedure

apoc.util.compress(data String, config Map<String, Any>) - zips the given string.

Function

apoc.util.decompress(data ByteArray, config Map<String, Any>) - unzips the given byte array.

Function

apoc.util.md5(values [Any]) - returns the MD5 checksum of the concatenation of all string values in the given list. MD5 is a weak hashing algorithm which is unsuitable for cryptographic use-cases.

Function

apoc.util.sha1(values [Any]) - returns the SHA1 of the concatenation of all string values in the given list.

Function

apoc.util.sha256(values [Any]) - returns the SHA256 of the concatenation of all string values in the given list.

Function

apoc.util.sha384(values [Any]) - returns the SHA384 of the concatenation of all string values in the given list.

Function

apoc.util.sha512(values [Any]) - returns the SHA512 of the concatenation of all string values in the list.

Function

apoc.util.validatePredicate(predicate Boolean, message String, params Map<String, Any>) - if the given predicate is true an exception is thrown, otherwise it returns true (for use inside WHERE subclauses).

Function

apoc.warmup

Qualified Name Type

apoc.warmup.run(loadProperties Boolean, loadDynamicProperties Boolean, loadIndexes Boolean) - loads all nodes and relationships in the database into memory.

Procedure

apoc.xml

Qualified Name Type

apoc.xml.parse(data String, path String, config Map<String, Any>, simple Boolean) - parses the given XML string as a map.

Function