APOC support

APOC (Awesome Procedures on Cypher) is a Neo4j library that provides access to additional procedures and functions, extending the use of the Cypher query language. For more information on APOC, see the APOC documentation.

Only a subset of the APOC Core functions and procedures are available in Aura, as shown below.

Generated on September 7, 2021.

apoc

Qualified Name Type

apoc.case
apoc.case([condition, query, condition, query, …​], elseQuery:'', params:{}) yield value - given a list of conditional / read-only query pairs, executes the query associated with the first conditional evaluating to true (or the else query if none are true) with the given parameters

Procedure

apoc.help
Provides descriptions of available procedures. To narrow the results, supply a search string. To also search in the description text, append + to the end of the search string.

Procedure

apoc.version
RETURN apoc.version() | return the current APOC installed version

Function

apoc.when
apoc.when(condition, ifQuery, elseQuery:'', params:{}) yield value - based on the conditional, executes read-only ifQuery or elseQuery with the given parameters

Procedure

apoc.agg

Qualified Name Type

apoc.agg.first
apoc.agg.first(value) - returns first value

Function

apoc.agg.graph
apoc.agg.graph(path) - returns map of graph {nodes, relationships} of all distinct nodes and relationships

Function

apoc.agg.last
apoc.agg.last(value) - returns last value

Function

apoc.agg.maxItems
apoc.agg.maxItems(item, value, groupLimit: -1) - returns a map {items:[], value:n} where value is the maximum value present, and items are all items with the same value. The number of items can be optionally limited.

Function

apoc.agg.median
apoc.agg.median(number) - returns median for non-null numeric values

Function

apoc.agg.minItems
apoc.agg.minItems(item, value, groupLimit: -1) - returns a map {items:[], value:n} where value is the minimum value present, and items are all items with the same value. The number of items can be optionally limited.

Function

apoc.agg.nth
apoc.agg.nth(value,offset) - returns value of nth row (or -1 for last)

Function

apoc.agg.percentiles
apoc.agg.percentiles(value,[percentiles = 0.5,0.75,0.9,0.95,0.99]) - returns given percentiles for values

Function

apoc.agg.product
apoc.agg.product(number) - returns given product for non-null values

Function

apoc.agg.slice
apoc.agg.slice(value, start, length) - returns subset of non-null values, start is 0 based and length can be -1

Function

apoc.agg.statistics
apoc.agg.statistics(value,[percentiles = 0.5,0.75,0.9,0.95,0.99]) - returns numeric statistics (percentiles, min,minNonZero,max,total,mean,stdev) for values

Function

apoc.algo

Qualified Name Type

apoc.algo.aStar
apoc.algo.aStar(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance','lat','lon') YIELD path, weight - run A* with relationship property name as cost function

Procedure

apoc.algo.aStarConfig
apoc.algo.aStar(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', {weight:'dist',default:10,x:'lon',y:'lat'}) YIELD path, weight - run A* with relationship property name as cost function

Procedure

apoc.algo.allSimplePaths
apoc.algo.allSimplePaths(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 5) YIELD path, weight - run allSimplePaths with relationships given and maxNodes

Procedure

apoc.algo.cover
apoc.algo.cover(nodes) yield rel - returns all relationships between this set of nodes

Procedure

apoc.algo.dijkstra
apoc.algo.dijkstra(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance', defaultValue, numberOfWantedResults) YIELD path, weight - run dijkstra with relationship property name as cost function

Procedure

apoc.algo.dijkstraWithDefaultWeight
apoc.algo.dijkstraWithDefaultWeight(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance', 10) YIELD path, weight - run dijkstra with relationship property name as cost function and a default weight if the property does not exist

Procedure

apoc.any

Qualified Name Type

apoc.any.properties
returns properties for virtual and real, nodes, rels and maps

Function

apoc.any.property
returns property for virtual and real, nodes, rels and maps

Function

apoc.atomic

Qualified Name Type

apoc.atomic.add
apoc.atomic.add(node/relatonship,propertyName,number) Sums the property’s value with the 'number' value

Procedure

apoc.atomic.concat
apoc.atomic.concat(node/relatonship,propertyName,string) Concats the property’s value with the 'string' value

Procedure

apoc.atomic.insert
apoc.atomic.insert(node/relatonship,propertyName,position,value) insert a value into the property’s array value at 'position'

Procedure

apoc.atomic.remove
apoc.atomic.remove(node/relatonship,propertyName,position) remove the element at position 'position'

Procedure

apoc.atomic.subtract
apoc.atomic.subtract(node/relatonship,propertyName,number) Subtracts the 'number' value to the property’s value

Procedure

apoc.atomic.update
apoc.atomic.update(node/relatonship,propertyName,updateOperation) update a property’s value with a cypher operation (ex. "n.prop1+n.prop2")

Procedure

apoc.bitwise

Qualified Name Type

apoc.bitwise.op
apoc.bitwise.op(60,'|',13) bitwise operations a & b, a | b, a ^ b, ~a, a >> b, a >>> b, a << b. returns the result of the bitwise operation

Function

apoc.coll

Qualified Name Type

apoc.coll.avg
apoc.coll.avg([0.5,1,2.3])

Function

apoc.coll.combinations
apoc.coll.combinations(coll, minSelect, maxSelect:minSelect) - Returns collection of all combinations of list elements of selection size between minSelect and maxSelect (default:minSelect), inclusive

Function

apoc.coll.contains
apoc.coll.contains(coll, value) optimized contains operation (using a HashSet) (returns single row or not)

Function

apoc.coll.containsAll
apoc.coll.containsAll(coll, values) optimized contains-all operation (using a HashSet) (returns single row or not)

Function

apoc.coll.containsAllSorted
apoc.coll.containsAllSorted(coll, value) optimized contains-all on a sorted list operation (Collections.binarySearch) (returns single row or not)

Function

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

Function

apoc.coll.containsSorted
apoc.coll.containsSorted(coll, value) optimized contains on a sorted list operation (Collections.binarySearch) (returns single row or not)

Function

apoc.coll.different
apoc.coll.different(values) - returns true if values are different

Function

apoc.coll.disjunction
apoc.coll.disjunction(first, second) - returns the disjunct set of the two lists

Function

apoc.coll.dropDuplicateNeighbors
apoc.coll.dropDuplicateNeighbors(list) - remove duplicate consecutive objects in a list

Function

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

Function

apoc.coll.duplicatesWithCount
apoc.coll.duplicatesWithCount(coll) - returns a list of duplicate items in the collection and their count, keyed by item and count (e.g., [{item: xyz, count:2}, {item:zyx, count:5}])

Function

apoc.coll.elements
apoc.coll.elements(list,limit,offset) yield _1,_2,..,_10,_1s,_2i,_3f,_4m,_5l,_6n,_7r,_8p - deconstruct subset of mixed list into identifiers of the correct type

Procedure

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

Function

apoc.coll.flatten
apoc.coll.flatten(coll, [recursive]) - flattens list (nested if recursive is true)

Function

apoc.coll.frequencies
apoc.coll.frequencies(coll) - returns a list of frequencies of the items in the collection, keyed by item and count (e.g., [{item: xyz, count:2}, {item:zyx, count:5}, {item:abc, count:1}])

Function

apoc.coll.frequenciesAsMap
apoc.coll.frequenciesAsMap(coll) - return a map of frequencies of the items in the collection, key item, value count (e.g., {1:2, 2:1})

Function

apoc.coll.indexOf
apoc.coll.indexOf(coll, value) | position of value in the list

Function

apoc.coll.insert
apoc.coll.insert(coll, index, value) | insert value at index

Function

apoc.coll.insertAll
apoc.coll.insertAll(coll, index, values) | insert values at index

Function

apoc.coll.intersection
apoc.coll.intersection(first, second) - returns the unique intersection of the two lists

Function

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

Function

apoc.coll.max
apoc.coll.max([0.5,1,2.3])

Function

apoc.coll.min
apoc.coll.min([0.5,1,2.3])

Function

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

Function

apoc.coll.pairs
apoc.coll.pairs([1,2,3]) returns [1,2],[2,3],[3,null]

Function

apoc.coll.pairsMin
apoc.coll.pairsMin([1,2,3]) returns [1,2],[2,3]

Function

apoc.coll.partition
apoc.coll.partition(list,batchSize)

Function

apoc.coll.partition
apoc.coll.partition(list,batchSize)

Procedure

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

Function

apoc.coll.randomItems
apoc.coll.randomItems(coll, itemCount, allowRepick: false) - returns a list of itemCount random items from the original list, optionally allowing picked elements to be picked again

Function

apoc.coll.remove
apoc.coll.remove(coll, index, [length=1]) | remove range of values from index to length

Function

apoc.coll.removeAll
apoc.coll.removeAll(first, second) - returns first list with all elements of second list removed

Function

apoc.coll.reverse
apoc.coll.reverse(coll) - returns reversed list

Function

apoc.coll.set
apoc.coll.set(coll, index, value) | set index to value

Function

apoc.coll.shuffle
apoc.coll.shuffle(coll) - returns the shuffled list

Function

apoc.coll.sort
apoc.coll.sort(coll) sort on Collections

Function

apoc.coll.sortMaps
apoc.coll.sortMaps([maps], 'name') - sort maps by property

Function

apoc.coll.sortMulti
apoc.coll.sortMulti(coll, ['^name','age'],[limit],[skip]) - sort list of maps by several sort fields (ascending with ^ prefix) and optionally applies limit and skip

Function

apoc.coll.sortNodes
apoc.coll.sortNodes([nodes], 'name') sort nodes by property

Function

apoc.coll.sortText
apoc.coll.sortText(coll) sort on string based collections

Function

apoc.coll.split
apoc.coll.split(list,value) | splits collection on given values rows of lists, value itself will not be part of resulting lists

Procedure

apoc.coll.subtract
apoc.coll.subtract(first, second) - returns unique set of first list with all elements of second list removed

Function

apoc.coll.sum
apoc.coll.sum([0.5,1,2.3])

Function

apoc.coll.sumLongs
apoc.coll.sumLongs([1,3,3])

Function

apoc.coll.toSet
apoc.coll.toSet([list]) returns a unique list backed by a set

Function

apoc.coll.union
apoc.coll.union(first, second) - creates the distinct union of the 2 lists

Function

apoc.coll.unionAll
apoc.coll.unionAll(first, second) - creates the full union with duplicates of the two lists

Function

apoc.coll.zip
apoc.coll.zip([list1],[list2])

Function

apoc.coll.zipToRows
apoc.coll.zipToRows(list1,list2) - creates pairs like zip but emits one row per pair

Procedure

apoc.convert

Qualified Name Type

apoc.convert.fromJsonList
apoc.convert.fromJsonList('[1,2,3]'[,'json-path', 'path-options'])

Function

apoc.convert.fromJsonMap
apoc.convert.fromJsonMap('{"a":42,"b":"foo","c":[1,2,3]}'[,'json-path', 'path-options'])

Function

apoc.convert.getJsonProperty
apoc.convert.getJsonProperty(node,key[,'json-path', 'path-options']) - converts serialized JSON in property back to original object

Function

apoc.convert.getJsonPropertyMap
apoc.convert.getJsonPropertyMap(node,key[,'json-path', 'path-options']) - converts serialized JSON in property back to map

Function

apoc.convert.setJsonProperty
apoc.convert.setJsonProperty(node,key,complexValue) - sets value serialized to JSON as property with the given name on the node

Procedure

apoc.convert.toBoolean
apoc.convert.toBoolean(value) | tries it’s best to convert the value to a boolean

Function

apoc.convert.toBooleanList
apoc.convert.toBooleanList(value) | tries it’s best to convert the value to a list of booleans

Function

apoc.convert.toFloat
apoc.convert.toFloat(value) | tries it’s best to convert the value to a float

Function

apoc.convert.toIntList
apoc.convert.toIntList(value) | tries it’s best to convert the value to a list of integers

Function

apoc.convert.toInteger
apoc.convert.toInteger(value) | tries it’s best to convert the value to an integer

Function

apoc.convert.toJson
apoc.convert.toJson([1,2,3]) or toJson({a:42,b:"foo",c:[1,2,3]}) or toJson(NODE/REL/PATH)

Function

apoc.convert.toList
apoc.convert.toList(value) | tries it’s best to convert the value to a list

Function

apoc.convert.toMap
apoc.convert.toMap(value) | tries it’s best to convert the value to a map

Function

apoc.convert.toNode
apoc.convert.toNode(value) | tries it’s best to convert the value to a node

Function

apoc.convert.toNodeList
apoc.convert.toNodeList(value) | tries it’s best to convert the value to a list of nodes

Function

apoc.convert.toRelationship
apoc.convert.toRelationship(value) | tries it’s best to convert the value to a relationship

Function

apoc.convert.toRelationshipList
apoc.convert.toRelationshipList(value) | tries it’s best to convert the value to a list of relationships

Function

apoc.convert.toSet
apoc.convert.toSet(value) | tries it’s best to convert the value to a set

Function

apoc.convert.toSortedJsonMap
apoc.convert.toSortedJsonMap(node|map, ignoreCase:true) - returns a JSON map with keys sorted alphabetically, with optional case sensitivity

Function

apoc.convert.toString
apoc.convert.toString(value) | tries it’s best to convert the value to a string

Function

apoc.convert.toStringList
apoc.convert.toStringList(value) | tries it’s best to convert the value to a list of strings

Function

apoc.convert.toTree
apoc.convert.toTree([paths],[lowerCaseRels=true], [config]) creates a stream of nested documents representing the at least one root of these paths

Procedure

apoc.create

Qualified Name Type

apoc.create.addLabels
apoc.create.addLabels( [node,id,ids,nodes], ['Label',…​]) - adds the given labels to the node or nodes

Procedure

apoc.create.node
apoc.create.node(['Label'], {key:value,…​}) - create node with dynamic labels

Procedure

apoc.create.nodes
apoc.create.nodes(['Label'], [{key:value,…​}]) create multiple nodes with dynamic labels

Procedure

apoc.create.relationship
apoc.create.relationship(person1,'KNOWS',{key:value,…​}, person2) create relationship with dynamic rel-type

Procedure

apoc.create.removeLabels
apoc.create.removeLabels( [node,id,ids,nodes], ['Label',…​]) - removes the given labels from the node or nodes

Procedure

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

Procedure

apoc.create.removeRelProperties
apoc.create.removeRelProperties( [rel,id,ids,rels], [keys]) - removes the given properties from the relationship(s)

Procedure

apoc.create.setLabels
apoc.create.setLabels( [node,id,ids,nodes], ['Label',…​]) - sets the given labels, non matching labels are removed on the node or nodes

Procedure

apoc.create.setProperties
apoc.create.setProperties( [node,id,ids,nodes], [keys], [values]) - sets the given properties on the nodes(s)

Procedure

apoc.create.setProperty
apoc.create.setProperty( [node,id,ids,nodes], key, value) - sets the given property on the node(s)

Procedure

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

Procedure

apoc.create.setRelProperty
apoc.create.setRelProperty( [rel,id,ids,rels], key, value) - sets the given property on the relationship(s)

Procedure

apoc.create.uuid
apoc.create.uuid() - creates an UUID

Function

apoc.create.uuids
apoc.create.uuids(count) yield uuid - creates 'count' UUIDs

Procedure

apoc.create.vNode
apoc.create.vNode(['Label'], {key:value,…​}) returns a virtual node

Procedure

apoc.create.vNode
apoc.create.vNode(['Label'], {key:value,…​}) returns a virtual node

Function

apoc.create.vNodes
apoc.create.vNodes(['Label'], [{key:value,…​}]) returns virtual nodes

Procedure

apoc.create.vPattern
apoc.create.vPattern({_labels:['LabelA'],key:value},'KNOWS',{key:value,…​}, {_labels:['LabelB'],key:value}) returns a virtual pattern

Procedure

apoc.create.vPatternFull
apoc.create.vPatternFull(['LabelA'],{key:value},'KNOWS',{key:value,…​},['LabelB'],{key:value}) returns a virtual pattern

Procedure

apoc.create.vRelationship
apoc.create.vRelationship(nodeFrom,'KNOWS',{key:value,…​}, nodeTo) returns a virtual relationship

Procedure

apoc.create.vRelationship
apoc.create.vRelationship(nodeFrom,'KNOWS',{key:value,…​}, nodeTo) returns a virtual relationship

Function

apoc.create.virtual.fromNode
apoc.create.virtual.fromNode(node, [propertyNames]) returns a virtual node built from an existing node with only the requested properties

Function

apoc.cypher

Qualified Name Type

apoc.cypher.doIt
apoc.cypher.doIt(fragment, params) yield value - executes writing fragment with the given parameters

Procedure

apoc.cypher.run
apoc.cypher.run(fragment, params) yield value - executes reading fragment with the given parameters - currently no schema operations

Procedure

apoc.cypher.runFirstColumn
use either apoc.cypher.runFirstColumnMany for a list return or apoc.cypher.runFirstColumnSingle for returning the first row of the first column

Function

apoc.cypher.runFirstColumnMany
apoc.cypher.runFirstColumnMany(statement, params) - executes statement with given parameters, returns first column only collected into a list, params are available as identifiers

Function

apoc.cypher.runFirstColumnSingle
apoc.cypher.runFirstColumnSingle(statement, params) - executes statement with given parameters, returns first element of the first column only, params are available as identifiers

Function

apoc.cypher.runMany
apoc.cypher.runMany('cypher;\nstatements;',{params},[{statistics:true,timeout:10}]) - runs each semicolon separated statement and returns summary - currently no schema operations

Procedure

apoc.cypher.runTimeboxed
apoc.cypher.runTimeboxed('cypherStatement',{params}, timeout) - abort kernelTransaction after timeout ms if not finished

Procedure

apoc.data

Qualified Name Type

apoc.data.domain
apoc.data.domain('url_or_email_address') YIELD domain - extract the domain name from a url or an email address. If nothing was found, yield null.

Function

apoc.data.url
apoc.data.url('url') as {protocol,host,port,path,query,file,anchor,user} | turn URL into map structure

Function

apoc.date

Qualified Name Type

apoc.date.add
apoc.date.add(12345, 'ms', -365, 'd') - given a timestamp in one time unit, adds a value of the specified time unit

Function

apoc.date.convert
apoc.date.convert(12345, 'ms', 'd') - convert a timestamp in one time unit into one of a different time unit

Function

apoc.date.convertFormat
apoc.date.convertFormat('Tue, 14 May 2019 14:52:06 -0400', 'rfc_1123_date_time', 'iso_date_time') - convert a String of one date format into a String of another date format.

Function

apoc.date.currentTimestamp
apoc.date.currentTimestamp() - returns System.currentTimeMillis() at the time it was called. The value is current throughout transaction execution, and is different from Cypher’s timestamp() function, which does not update within a transaction.

Function

apoc.date.field
apoc.date.field(12345,('ms|s|m|h|d|month|year'),('TZ')

Function

apoc.date.fields
apoc.date.fields('2012-12-23',('yyyy-MM-dd')) - return columns and a map representation of date parsed with the given format with entries for years,months,weekdays,days,hours,minutes,seconds,zoneid

Function

apoc.date.format
apoc.date.format(12345,('ms|s|m|h|d'),('yyyy-MM-dd HH:mm:ss zzz'),('TZ')) - get string representation of time value optionally using the specified unit (default ms) using specified format (default ISO) and specified time zone (default current TZ)

Function

apoc.date.fromISO8601
apoc.date.fromISO8601('yyyy-MM-ddTHH:mm:ss.SSSZ') - return number representation of time in EPOCH format

Function

apoc.date.parse
apoc.date.parse('2012-12-23','ms|s|m|h|d','yyyy-MM-dd') - parse date string using the specified format into the specified time unit

Function

apoc.date.parseAsZonedDateTime
apoc.date.parseAsZonedDateTime('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset') - parse date string using the specified format to specified timezone

Function

apoc.date.systemTimezone
apoc.date.systemTimezone() - returns the system timezone display name

Function

apoc.date.toISO8601
apoc.date.toISO8601(12345,('ms|s|m|h|d') - return string representation of time in ISO8601 format

Function

apoc.date.toYears
toYears(timestamp) or toYears(date[,format]) - converts timestamp into floating point years

Function

apoc.diff

Qualified Name Type

Function

apoc.do

Qualified Name Type

apoc.do.case
apoc.do.case([condition, query, condition, query, …​], elseQuery:'', params:{}) yield value - given a list of conditional / writing query pairs, executes the query associated with the first conditional evaluating to true (or the else query if none are true) with the given parameters

Procedure

apoc.do.when
apoc.do.when(condition, ifQuery, elseQuery:'', params:{}) yield value - based on the conditional, executes writing ifQuery or elseQuery with the given parameters

Procedure

apoc.example

Qualified Name Type

apoc.example.movies
apoc.example.movies() | Creates the sample movies graph

Procedure

apoc.graph

Qualified Name Type

apoc.graph.from
apoc.graph.from(data,'name',{properties}) | creates a virtual graph object for later processing it tries its best to extract the graph information from the data you pass in

Procedure

apoc.graph.fromCypher
apoc.graph.fromCypher('kernelTransaction',{params},'name',{properties}) - creates a virtual graph object for later processing

Procedure

apoc.graph.fromDB
apoc.graph.fromDB('name',{properties}) - creates a virtual graph object for later processing

Procedure

apoc.graph.fromData
apoc.graph.fromData([nodes],[relationships],'name',{properties}) | creates a virtual graph object for later processing

Procedure

apoc.graph.fromDocument
apoc.graph.fromDocument({json}, {config}) yield graph - transform JSON documents into graph structures

Procedure

apoc.graph.fromPath
apoc.graph.fromPath(path,'name',{properties}) - creates a virtual graph object for later processing

Procedure

apoc.graph.fromPaths
apoc.graph.fromPaths([paths],'name',{properties}) - creates a virtual graph object for later processing

Procedure

apoc.graph.validateDocument
apoc.graph.validateDocument({json}, {config}) yield row - validates the json, return the result of the validation

Procedure

apoc.hashing

Qualified Name Type

apoc.hashing.fingerprint
calculate a checksum (md5) over a node or a relationship. This deals gracefully with array properties. Two identical entities do share the same hash.

Function

apoc.hashing.fingerprintGraph
calculate a checksum (md5) over a the full graph. Be aware that this function does use in-memomry datastructures depending on the size of your graph.

Function

apoc.hashing.fingerprinting
calculate a checksum (md5) over a node or a relationship. This deals gracefully with array properties. Two identical entities do share the same hash.

Function

apoc.import

Qualified Name Type

apoc.import.csv
apoc.import.csv(nodes, relationships, config) - imports nodes and relationships from the provided CSV files with given labels and types

Procedure

apoc.json

Qualified Name Type

apoc.json.path
apoc.json.path('{json}' [,'json-path' , 'path-options'])

Function

apoc.label

Qualified Name Type

apoc.label.exists
apoc.label.exists(element, label) - returns true or false related to label existance

Function

apoc.load

Qualified Name Type

apoc.load.json
apoc.load.json('url',path, config) YIELD value - import JSON as stream of values if the JSON was an array or a single value if it was a map

Procedure

apoc.load.jsonArray
apoc.load.jsonArray('url') YIELD value - load array from JSON URL (e.g. web-api) to import JSON as stream of values

Procedure

apoc.lock

Qualified Name Type

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

Procedure

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

Procedure

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

Procedure

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

Procedure

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

Procedure

apoc.map

Qualified Name Type

apoc.map.clean
apoc.map.clean(map,[skip,keys],[skip,values]) yield map filters the keys and values contained in those lists, good for data cleaning from CSV/JSON

Function

apoc.map.flatten
apoc.map.flatten(map, delimiter:'.') yield map - flattens nested items in map using dot notation

Function

apoc.map.fromLists
apoc.map.fromLists([keys],[values])

Function

apoc.map.fromNodes
apoc.map.fromNodes(label, property)

Function

apoc.map.fromPairs
apoc.map.fromPairs([[key,value],[key2,value2],…​])

Function

apoc.map.fromValues
apoc.map.fromValues([key1,value1,key2,value2,…​])

Function

apoc.map.get
apoc.map.get(map,key,[default],[fail=true]) - returns value for key or throws exception if key doesn’t exist and no default given

Function

apoc.map.groupBy
apoc.map.groupBy([maps/nodes/relationships],'key') yield value - creates a map of the list keyed by the given property, with single values

Function

apoc.map.groupByMulti
apoc.map.groupByMulti([maps/nodes/relationships],'key') yield value - creates a map of the list keyed by the given property, with list values

Function

apoc.map.merge
apoc.map.merge(first,second) - merges two maps

Function

apoc.map.mergeList
apoc.map.mergeList([{maps}]) yield value - merges all maps in the list into one

Function

apoc.map.mget
apoc.map.mget(map,key,[defaults],[fail=true]) - returns list of values for keys or throws exception if one of the key doesn’t exist and no default value given at that position

Function

apoc.map.removeKey
apoc.map.removeKey(map,key,{recursive:true/false}) - remove the key from the map (recursively if recursive is true)

Function

apoc.map.removeKeys
apoc.map.removeKeys(map,[keys],{recursive:true/false}) - remove the keys from the map (recursively if recursive is true)

Function

apoc.map.setEntry
apoc.map.setEntry(map,key,value)

Function

apoc.map.setKey
apoc.map.setKey(map,key,value)

Function

apoc.map.setLists
apoc.map.setLists(map,[keys],[values])

Function

apoc.map.setPairs
apoc.map.setPairs(map,[[key1,value1],[key2,value2])

Function

apoc.map.setValues
apoc.map.setValues(map,[key1,value1,key2,value2])

Function

apoc.map.sortedProperties
apoc.map.sortedProperties(map, ignoreCase:true) - returns a list of key/value list pairs, with pairs sorted by keys alphabetically, with optional case sensitivity

Function

apoc.map.submap
apoc.map.submap(map,keys,[defaults],[fail=true]) - returns submap for keys or throws exception if one of the key doesn’t exist and no default value given at that position

Function

apoc.map.updateTree
apoc.map.updateTree(tree,key,) returns map - adds the {data} map on each level of the nested tree, where the key-value pairs match

Function

apoc.map.values
apoc.map.values(map, [key1,key2,key3,…​],[addNullsForMissing]) returns list of values indicated by the keys

Function

apoc.math

Qualified Name Type

apoc.math.maxByte
apoc.math.maxByte() | return the maximum value an byte can have

Function

apoc.math.maxDouble
apoc.math.maxDouble() | return the largest positive finite value of type double

Function

apoc.math.maxInt
apoc.math.maxInt() | return the maximum value an int can have

Function

apoc.math.maxLong
apoc.math.maxLong() | return the maximum value a long can have

Function

apoc.math.minByte
apoc.math.minByte() | return the minimum value an byte can have

Function

apoc.math.minDouble
apoc.math.minDouble() | return the smallest positive nonzero value of type double

Function

apoc.math.minInt
apoc.math.minInt() | return the minimum value an int can have

Function

apoc.math.minLong
apoc.math.minLong() | return the minimum value a long can have

Function

apoc.math.regr
apoc.math.regr(label, propertyY, propertyX) - It calculates the coefficient of determination (R-squared) for the values of propertyY and propertyX in the provided label

Procedure

apoc.math.round
apoc.math.round(value,[prec],mode=[CEILING,FLOOR,UP,DOWN,HALF_EVEN,HALF_DOWN,HALF_UP,DOWN,UNNECESSARY])

Function

apoc.merge

Qualified Name Type

apoc.merge.node
"apoc.merge.node.eager(['Label'], identProps:{key:value, …​}, onCreateProps:{key:value,…​}, onMatchProps:{key:value,…​}}) - merge nodes with dynamic labels, with support for setting properties ON CREATE or ON MATCH

Procedure

apoc.merge.node.eager
apoc.merge.node.eager(['Label'], identProps:{key:value, …​}, onCreateProps:{key:value,…​}, onMatchProps:{key:value,…​}}) - merge nodes eagerly, with dynamic labels, with support for setting properties ON CREATE or ON MATCH

Procedure

apoc.merge.relationship
apoc.merge.relationship(startNode, relType, identProps:{key:value, …​}, onCreateProps:{key:value, …​}, endNode, onMatchProps:{key:value, …​}) - merge relationship with dynamic type, with support for setting properties ON CREATE or ON MATCH

Procedure

apoc.merge.relationship.eager
apoc.merge.relationship(startNode, relType, identProps:{key:value, …​}, onCreateProps:{key:value, …​}, endNode, onMatchProps:{key:value, …​}) - merge relationship with dynamic type, with support for setting properties ON CREATE or ON MATCH

Procedure

apoc.meta

Qualified Name Type

apoc.meta.cypher.isType
apoc.meta.cypher.isType(value,type) - returns a row if type name matches none if not (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,MAP,LIST OF <TYPE>,POINT,DATE,DATE_TIME,LOCAL_TIME,LOCAL_DATE_TIME,TIME,DURATION)

Function

apoc.meta.cypher.type
apoc.meta.cypher.type(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,MAP,LIST OF <TYPE>,POINT,DATE,DATE_TIME,LOCAL_TIME,LOCAL_DATE_TIME,TIME,DURATION)

Function

apoc.meta.cypher.types
apoc.meta.cypher.types(node-relationship-map) - returns a map of keys to types

Function

apoc.meta.data
apoc.meta.data({config}) - examines a subset of the graph to provide a tabular meta information

Procedure

apoc.meta.graph
apoc.meta.graph - examines the full graph to create the meta-graph

Procedure

apoc.meta.graphSample
apoc.meta.graphSample() - examines the database statistics to build the meta graph, very fast, might report extra relationships

Procedure

apoc.meta.isType
apoc.meta.isType(value,type) - returns a row if type name matches none if not (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,UNKNOWN,MAP,LIST)

Function

apoc.meta.nodeTypeProperties
apoc.meta.nodeTypeProperties()

Procedure

apoc.meta.relTypeProperties
apoc.meta.relTypeProperties()

Procedure

apoc.meta.schema
apoc.meta.schema({config}) - examines a subset of the graph to provide a map-like meta information

Procedure

apoc.meta.stats
apoc.meta.stats yield labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount, labels, relTypes, stats | returns the information stored in the transactional database statistics

Procedure

apoc.meta.subGraph
apoc.meta.subGraph({labels:[labels],rels:[rel-types], excludes:[labels,rel-types]}) - examines a sample sub graph to create the meta-graph

Procedure

apoc.meta.type
apoc.meta.type(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,UNKNOWN,MAP,LIST)

Function

apoc.meta.typeName
apoc.meta.typeName(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,UNKNOWN,MAP,LIST)

Function

apoc.meta.types
apoc.meta.types(node-relationship-map) - returns a map of keys to types

Function

apoc.neighbors

Qualified Name Type

apoc.neighbors.athop
apoc.neighbors.athop(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at a distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

apoc.neighbors.athop.count
apoc.neighbors.athop.count(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at a distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

apoc.neighbors.byhop
apoc.neighbors.byhop(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at each distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

apoc.neighbors.byhop.count
apoc.neighbors.byhop.count(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at each distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

apoc.neighbors.tohop
apoc.neighbors.tohop(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern up to a certain distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

apoc.neighbors.tohop.count
apoc.neighbors.tohop.count(node, rel-direction-pattern, distance) - returns distinct count of nodes of the given relationships in the pattern up to a certain distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

apoc.node

Qualified Name Type

apoc.node.degree
apoc.node.degree(node, rel-direction-pattern) - returns total degrees of the given relationships in the pattern, can use '>' or '<' for all outgoing or incoming relationships

Function

apoc.node.degree.in
apoc.node.degree.in(node, relationshipName) - returns total number number of incoming relationships

Function

apoc.node.degree.out
apoc.node.degree.out(node, relationshipName) - returns total number number of outgoing relationships

Function

apoc.node.id
returns id for (virtual) nodes

Function

apoc.node.labels
returns labels for (virtual) nodes

Function

apoc.node.relationship.exists
apoc.node.relationship.exists(node, rel-direction-pattern) - returns true when the node has the relationships of the pattern

Function

apoc.node.relationship.types
apoc.node.relationship.types(node, rel-direction-pattern) - returns a list of distinct relationship types

Function

apoc.node.relationships.exist
apoc.node.relationships.exist(node, rel-direction-pattern) - returns a map with rel-pattern, boolean for the given relationship patterns

Function

apoc.nodes

Qualified Name Type

apoc.nodes.collapse
apoc.nodes.collapse([nodes…​],[{properties:'overwrite' or 'discard' or 'combine'}]) yield from, rel, to merge nodes onto first in list

Procedure

apoc.nodes.connected
apoc.nodes.connected(start, end, rel-direction-pattern) - returns true when the node is connected to the other node, optimized for dense nodes

Function

apoc.nodes.delete
apoc.nodes.delete(node|nodes|id|[ids]) - quickly delete all nodes with these ids

Procedure

apoc.nodes.get
apoc.nodes.get(node|nodes|id|[ids]) - quickly returns all nodes with these ids

Procedure

Procedure

apoc.nodes.isDense
apoc.nodes.isDense(node) - returns true if it is a dense node

Function

apoc.nodes.link
apoc.nodes.link([nodes],'REL_TYPE', conf) - creates a linked list of nodes from first to last

Procedure

apoc.nodes.relationship.types
apoc.nodes.relationship.types(node|nodes|id|[ids], rel-direction-pattern) - returns a list of maps where each one has two fields: node which is the node subject of the analysis and types which is a list of distinct relationship types

Function

apoc.nodes.relationships.exist
apoc.nodes.relationships.exist(node|nodes|id|[ids], rel-direction-pattern) - returns a list of maps where each one has two fields: node which is the node subject of the analysis and exists which is a map with rel-pattern, boolean for the given relationship patterns

Function

apoc.nodes.rels
apoc.get.rels(rel|id|[ids]) - quickly returns all relationships with these ids

Procedure

apoc.number

Qualified Name Type

apoc.number.arabicToRoman
apoc.number.arabicToRoman(number) | convert arabic numbers to roman

Function

apoc.number.exact.add
apoc.number.exact.add(stringA,stringB) - return the sum’s result of two large numbers

Function

apoc.number.exact.div
apoc.number.exact.div(stringA,stringB,[prec],[roundingModel]) - return the division’s result of two large numbers

Function

apoc.number.exact.mul
apoc.number.exact.mul(stringA,stringB,[prec],[roundingModel]) - return the multiplication’s result of two large numbers

Function

apoc.number.exact.sub
apoc.number.exact.sub(stringA,stringB) - return the substraction’s of two large numbers

Function

apoc.number.exact.toExact
apoc.number.exact.toExact(number) - return the exact value

Function

apoc.number.exact.toFloat
apoc.number.exact.toFloat(string,[prec],[roundingMode]) - return the Float value of a large number

Function

apoc.number.exact.toInteger
apoc.number.exact.toInteger(string,[prec],[roundingMode]) - return the Integer value of a large number

Function

apoc.number.format
apoc.number.format(number) | format a long or double using the default system pattern and language to produce a string

Function

apoc.number.parseFloat
apoc.number.parseFloat(text) | parse a text using the default system pattern and language to produce a double

Function

apoc.number.parseInt
apoc.number.parseInt(text) | parse a text using the default system pattern and language to produce a long

Function

apoc.number.romanToArabic
apoc.number.romanToArabic(romanNumber) | convert roman numbers to arabic

Function

apoc.path

Qualified Name Type

apoc.path.combine
apoc.path.combine(path1, path2) - combines the paths into one if the connecting node matches

Function

apoc.path.create
apoc.path.create(startNode,[rels]) - creates a path instance of the given elements

Function

apoc.path.elements
apoc.path.elements(path) - returns a list of node-relationship-node-…​

Function

apoc.path.expand
apoc.path.expand(startNode <id>|Node|list, 'TYPE|TYPE_OUT>|<TYPE_IN', '+YesLabel|-NoLabel', minLevel, maxLevel ) yield path - expand from start node following the given relationships from min to max-level adhering to the label filters

Procedure

apoc.path.expandConfig
apoc.path.expandConfig(startNode <id>|Node|list, {minLevel,maxLevel,uniqueness,relationshipFilter,labelFilter,uniqueness:'RELATIONSHIP_PATH',bfs:true, filterStartNode:false, limit:-1, optional:false, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield path - expand from start node following the given relationships from min to max-level adhering to the label filters.

Procedure

apoc.path.slice
apoc.path.slice(path, [offset], [length]) - creates a sub-path with the given offset and length

Function

apoc.path.spanningTree
apoc.path.spanningTree(startNode <id>|Node|list, {maxLevel,relationshipFilter,labelFilter,bfs:true, filterStartNode:false, limit:-1, optional:false, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield path - expand a spanning tree reachable from start node following relationships to max-level adhering to the label filters

Procedure

apoc.path.subgraphAll
apoc.path.subgraphAll(startNode <id>|Node|list, {maxLevel,relationshipFilter,labelFilter,bfs:true, filterStartNode:false, limit:-1, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield nodes, relationships - expand the subgraph reachable from start node following relationships to max-level adhering to the label filters, and also return all relationships within the subgraph

Procedure

apoc.path.subgraphNodes
apoc.path.subgraphNodes(startNode <id>|Node|list, {maxLevel,relationshipFilter,labelFilter,bfs:true, filterStartNode:false, limit:-1, optional:false, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield node - expand the subgraph nodes reachable from start node following relationships to max-level adhering to the label filters

Procedure

apoc.periodic

Qualified Name Type

apoc.periodic.cancel
apoc.periodic.cancel(name) - cancel job with the given name

Procedure

apoc.periodic.commit
apoc.periodic.commit(statement,params) - runs the given statement in separate transactions until it returns 0

Procedure

apoc.periodic.countdown
apoc.periodic.countdown('name',statement,repeat-rate-in-seconds) submit a repeatedly-called background statement until it returns 0

Procedure

apoc.periodic.iterate
apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:1000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0}) YIELD batches, total - run the second statement for each item returned by the first statement. Returns number of batches and total processed rows

Procedure

apoc.periodic.list
apoc.periodic.list - list all jobs

Procedure

apoc.periodic.repeat
apoc.periodic.repeat('name',statement,repeat-rate-in-seconds, config) submit a repeatedly-called background statement. Fourth parameter 'config' is optional and can contain 'params' entry for nested statement.

Procedure

apoc.periodic.submit
apoc.periodic.submit('name',statement,params) - submit a one-off background statement; parameter 'params' is optional and can contain query parameters for Cypher statement

Procedure

apoc.refactor

Qualified Name Type

apoc.refactor.categorize
apoc.refactor.categorize(sourceKey, type, outgoing, label, targetKey, copiedKeys, batchSize) turn each unique propertyKey into a category node and connect to it

Procedure

apoc.refactor.cloneNodes
apoc.refactor.cloneNodes([node1,node2,…​]) clone nodes with their labels and properties

Procedure

apoc.refactor.cloneNodesWithRelationships
apoc.refactor.cloneNodesWithRelationships([node1,node2,…​]) clone nodes with their labels, properties and relationships

Procedure

apoc.refactor.cloneSubgraph
apoc.refactor.cloneSubgraph([node1,node2,…​], [rel1,rel2,…​]:[], {standinNodes:[], skipProperties:[]}) YIELD input, output, error | clone nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clone the given relationships (will exist between cloned nodes only). If no relationships are provided, all relationships between the given nodes will be cloned. Relationships can be optionally redirected according to standinNodes node pairings (this is a list of list-pairs of nodes), so given a node in the original subgraph (first of the pair), an existing node (second of the pair) can act as a standin for it within the cloned subgraph. Cloned relationships will be redirected to the standin.

Procedure

apoc.refactor.cloneSubgraphFromPaths
apoc.refactor.cloneSubgraphFromPaths([path1, path2, …​], {standinNodes:[], skipProperties:[]}) YIELD input, output, error | from the subgraph formed from the given paths, clone nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clone the relationships (will exist between cloned nodes only). Relationships can be optionally redirected according to standinNodes node pairings (this is a list of list-pairs of nodes), so given a node in the original subgraph (first of the pair), an existing node (second of the pair) can act as a standin for it within the cloned subgraph. Cloned relationships will be redirected to the standin.

Procedure

apoc.refactor.collapseNode
apoc.refactor.collapseNode([node1,node2],'TYPE') collapse node to relationship, node with one rel becomes self-relationship

Procedure

apoc.refactor.extractNode
apoc.refactor.extractNode([rel1,rel2,…​], [labels],'OUT','IN') extract node from relationships

Procedure

apoc.refactor.from
apoc.refactor.from(rel, startNode) redirect relationship to use new start-node

Procedure

apoc.refactor.invert
apoc.refactor.invert(rel) inverts relationship direction

Procedure

apoc.refactor.mergeNodes
apoc.refactor.mergeNodes([node1,node2],[{properties:'overwrite' or 'discard' or 'combine'}]) merge nodes onto first in list

Procedure

apoc.refactor.mergeRelationships
apoc.refactor.mergeRelationships([rel1,rel2]) merge relationships onto first in list

Procedure

apoc.refactor.normalizeAsBoolean
apoc.refactor.normalizeAsBoolean(entity, propertyKey, true_values, false_values) normalize/convert a property to be boolean

Procedure

apoc.refactor.rename.label
apoc.refactor.rename.label(oldLabel, newLabel, [nodes]) | rename a label from 'oldLabel' to 'newLabel' for all nodes. If 'nodes' is provided renaming is applied to this set only

Procedure

apoc.refactor.rename.nodeProperty
apoc.refactor.rename.nodeProperty(oldName, newName, [nodes], {config}) | rename all node’s property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to this set only

Procedure

apoc.refactor.rename.type
apoc.refactor.rename.type(oldType, newType, [rels], {config}) | rename all relationships with type 'oldType' to 'newType'. If 'rels' is provided renaming is applied to this set only

Procedure

apoc.refactor.rename.typeProperty
apoc.refactor.rename.typeProperty(oldName, newName, [rels], {config}) | rename all relationship’s property from 'oldName' to 'newName'. If 'rels' is provided renaming is applied to this set only

Procedure

apoc.refactor.setType
apoc.refactor.setType(rel, 'NEW-TYPE') change relationship-type

Procedure

apoc.refactor.to
apoc.refactor.to(rel, endNode) redirect relationship to use new end-node

Procedure

apoc.rel

Qualified Name Type

apoc.rel.id
returns id for (virtual) relationships

Function

apoc.rel.type
returns type for (virtual) relationships

Function

apoc.schema

Qualified Name Type

apoc.schema.assert
apoc.schema.assert({indexLabel:, …​}, {constraintLabel:[constraintKeys], …​}, dropExisting : true) yield label, key, keys, unique, action - drops all other existing indexes and constraints when dropExisting is true (default is true), and asserts that at the end of the operation the given indexes and unique constraints are there, each label:key pair is considered one constraint/label. Non-constraint indexes can define compound indexes with label:[key1,key2…​] pairings.

Procedure

apoc.schema.node.constraintExists
RETURN apoc.schema.node.constraintExists(labelName, propertyNames)

Function

apoc.schema.node.indexExists
RETURN apoc.schema.node.indexExists(labelName, propertyNames)

Function

apoc.schema.nodes
CALL apoc.schema.nodes([config]) yield name, label, properties, status, type

Procedure

apoc.schema.properties.distinct
apoc.schema.properties.distinct(label, key) - quickly returns all distinct values for a given key

Procedure

apoc.schema.properties.distinctCount
apoc.schema.properties.distinctCount([label], [key]) YIELD label, key, value, count - quickly returns all distinct values and counts for a given key

Procedure

apoc.schema.relationship.constraintExists
RETURN apoc.schema.relationship.constraintExists(type, propertyNames)

Function

apoc.schema.relationships
CALL apoc.schema.relationships([config]) yield name, startLabel, type, endLabel, properties, status

Procedure

apoc.scoring

Qualified Name Type

apoc.scoring.existence
apoc.scoring.existence(5, true) returns the provided score if true, 0 if false

Function

apoc.scoring.pareto
apoc.scoring.pareto(10, 20, 100, 11) applies a Pareto scoring function over the inputs

Function

Qualified Name Type

apoc.search.multiSearchReduced
Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched properties. apoc.search.multiSearchReduced( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ). Multiple search results for the same node are merged into one record.

Procedure

apoc.search.node
Do a parallel search over multiple indexes returning nodes. usage apoc.search.node( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the DISTINCT Nodes found in the different searches.

Procedure

apoc.search.nodeAll
Do a parallel search over multiple indexes returning nodes. usage apoc.search.nodeAll( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the Nodes found in the different searches.

Procedure

apoc.search.nodeAllReduced
Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched property. apoc.search.nodeShortAll( map of label and properties which will be searched upon, operator: EXACT / CONTAINS / STARTS WITH | ENDS WITH / = / <> / < / > …​, value ). All 'hits' are returned.

Procedure

apoc.search.nodeReduced
Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched properties. apoc.search.nodeReduced( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ). Multiple search results for the same node are merged into one record.

Procedure

apoc.spatial

Qualified Name Type

apoc.spatial.geocode
apoc.spatial.geocode('address') YIELD location, latitude, longitude, description, osmData - look up geographic location of address from a geocoding service (the default one is OpenStreetMap)

Procedure

apoc.spatial.geocodeOnce
apoc.spatial.geocodeOnce('address') YIELD location, latitude, longitude, description, osmData - look up geographic location of address from a geocoding service (the default one is OpenStreetMap)

Procedure

apoc.spatial.reverseGeocode
apoc.spatial.reverseGeocode(latitude,longitude) YIELD location, latitude, longitude, description - look up address from latitude and longitude from a geocoding service (the default one is OpenStreetMap)

Procedure

apoc.spatial.sortByDistance
apoc.spatial.sortByDistance(List<Path>) sort the given paths based on the geo informations (lat/long) in ascending order

Procedure

apoc.stats

Qualified Name Type

Procedure

apoc.temporal

Qualified Name Type

apoc.temporal.format
apoc.temporal.format(input, format) | Format a temporal value

Function

apoc.temporal.formatDuration
apoc.temporal.formatDuration(input, format) | Format a Duration

Function

apoc.temporal.toZonedTemporal
apoc.temporal.toZonedTemporal('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset') parse date string using the specified format to specified timezone

Function

apoc.text

Qualified Name Type

apoc.text.base64Decode
apoc.text.base64Decode(text) YIELD value - Decode Base64 encoded string

Function

apoc.text.base64Encode
apoc.text.base64Encode(text) YIELD value - Encode a string with Base64

Function

apoc.text.base64UrlDecode
apoc.text.base64UrlDecode(url) YIELD value - Decode Base64 encoded url

Function

apoc.text.base64UrlEncode
apoc.text.base64UrlEncode(text) YIELD value - Encode a url with Base64

Function

apoc.text.byteCount
apoc.text.byteCount(text,[charset]) - return size of text in bytes

Function

apoc.text.bytes
apoc.text.bytes(text,[charset]) - return bytes of the text

Function

apoc.text.camelCase
apoc.text.camelCase(text) YIELD value - Convert a string to camelCase

Function

apoc.text.capitalize
apoc.text.capitalize(text) YIELD value - capitalise the first letter of the word

Function

apoc.text.capitalizeAll
apoc.text.capitalizeAll(text) YIELD value - capitalise the first letter of every word in the text

Function

apoc.text.charAt
apoc.text.charAt(text, index) - the decimal value of the character at the given index

Function

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

Function

apoc.text.code
apoc.text.code(codepoint) - Returns the unicode character of the given codepoint

Function

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

Function

apoc.text.decapitalize
apoc.text.decapitalize(text) YIELD value - decapitalize the first letter of the word

Function

apoc.text.decapitalizeAll
apoc.text.decapitalizeAll(text) YIELD value - decapitalize the first letter of all words

Function

apoc.text.distance
apoc.text.distance(text1, text2) - compare the given strings with the Levenshtein distance algorithm.

Function

apoc.text.doubleMetaphone
apoc.text.doubleMetaphone(value) yield value - Compute the Double Metaphone phonetic encoding of all words of the text value

Function

apoc.text.doubleMetaphone
apoc.text.doubleMetaphone(value) yield value - Compute the Double Metaphone phonetic encoding of all words of the text value which can be a single string or a list of strings

Procedure

apoc.text.format
apoc.text.format(text,[params],language) - sprintf format the string with the params given

Function

apoc.text.fuzzyMatch
apoc.text.fuzzyMatch(text1, text2) - check if 2 words can be matched in a fuzzy way. Depending on the length of the String it will allow more characters that needs to be edited to match the second String.

Function

apoc.text.hammingDistance
apoc.text.hammingDistance(text1, text2) - compare the given strings with the Hamming distance algorithm.

Function

apoc.text.hexCharAt
apoc.text.hexCharAt(text, index) - the hex value string of the character at the given index

Function

apoc.text.hexValue
apoc.text.hexValue(value) - the hex value string of the given number

Function

apoc.text.indexOf
apoc.text.indexOf(text, lookup, from=0, to=-1==len) - find the first occurence of the lookup string in the text, from inclusive, to exclusive, -1 if not found, null if text is null.

Function

apoc.text.indexesOf
apoc.text.indexesOf(text, lookup, from=0, to=-1==len) - finds all occurences of the lookup string in the text, return list, from inclusive, to exclusive, empty list if not found, null if text is null.

Function

apoc.text.jaroWinklerDistance
apoc.text.jaroWinklerDistance(text1, text2) - compare the given strings with the Jaro-Winkler distance algorithm.

Function

apoc.text.join
apoc.text.join(['text1','text2',…​], delimiter) - join the given strings with the given delimiter.

Function

apoc.text.levenshteinDistance
apoc.text.levenshteinDistance(text1, text2) - compare the given strings with the Levenshtein distance algorithm.

Function

apoc.text.levenshteinSimilarity
apoc.text.levenshteinSimilarity(text1, text2) - calculate the similarity (a value within 0 and 1) between two texts.

Function

apoc.text.lpad
apoc.text.lpad(text,count,delim) YIELD value - left pad the string to the given width

Function

apoc.text.phonetic
apoc.text.phonetic(text) yield value - Compute the US_ENGLISH phonetic soundex encoding of all words of the text

Function

apoc.text.phonetic
apoc.text.phonetic(value) yield value - Compute the US_ENGLISH phonetic soundex encoding of all words of the text value which can be a single string or a list of strings

Procedure

apoc.text.phoneticDelta
apoc.text.phoneticDelta(text1, text2) yield phonetic1, phonetic2, delta - Compute the US_ENGLISH soundex character difference between two given strings

Procedure

apoc.text.random
apoc.text.random(length, valid) YIELD value - generate a random string

Function

apoc.text.regexGroups
apoc.text.regexGroups(text, regex) - return all matching groups of the regex on the given text.

Function

apoc.text.regreplace
apoc.text.regreplace(text, regex, replacement) - replace each substring of the given string that matches the given regular expression with the given replacement.

Function

apoc.text.repeat
apoc.text.repeat(item, count) - string multiplication

Function

apoc.text.replace
apoc.text.replace(text, regex, replacement) - replace each substring of the given string that matches the given regular expression with the given replacement.

Function

apoc.text.rpad
apoc.text.rpad(text,count,delim) YIELD value - right pad the string to the given width

Function

apoc.text.slug
apoc.text.slug(text, delim) - slug the text with the given delimiter

Function

apoc.text.snakeCase
apoc.text.snakeCase(text) YIELD value - Convert a string to snake-case

Function

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

Function

apoc.text.split
apoc.text.split(text, regex, limit) - splits the given text around matches of the given regex.

Function

apoc.text.swapCase
apoc.text.swapCase(text) YIELD value - Swap the case of a string

Function

apoc.text.toCypher
apoc.text.toCypher(value, {skipKeys,keepKeys,skipValues,keepValues,skipNull,node,relationship,start,end}) | tries it’s best to convert the value to a cypher-property-string

Function

apoc.text.toUpperCase
apoc.text.toUpperCase(text) YIELD value - Convert a string to UPPER_CASE

Function

apoc.text.upperCamelCase
apoc.text.upperCamelCase(text) YIELD value - Convert a string to camelCase

Function

apoc.text.urldecode
apoc.text.urldecode(text) - return the urldecoded text

Function

apoc.text.urlencode
apoc.text.urlencode(text) - return the urlencoded text

Function

apoc.util

Qualified Name Type

apoc.util.md5
apoc.util.md5([values]) | computes the md5 of the concatenation of all string values of the list

Function

apoc.util.sha1
apoc.util.sha1([values]) | computes the sha1 of the concatenation of all string values of the list

Function

apoc.util.sha256
apoc.util.sha256([values]) | computes the sha256 of the concatenation of all string values of the list

Function

apoc.util.sha384
apoc.util.sha384([values]) | computes the sha384 of the concatenation of all string values of the list

Function

apoc.util.sha512
apoc.util.sha512([values]) | computes the sha512 of the concatenation of all string values of the list

Function

apoc.util.sleep
apoc.util.sleep(<duration>) | sleeps for <duration> millis, transaction termination is honored

Procedure

apoc.util.validate
apoc.util.validate(predicate, message, params) | if the predicate yields to true raise an exception

Procedure

apoc.util.validatePredicate
apoc.util.validatePredicate(predicate, message, params) | if the predicate yields to true raise an exception else returns true, for use inside WHERE subclauses

Function

apoc.warmup

Qualified Name Type

apoc.warmup.run
apoc.warmup.run(loadProperties=false,loadDynamicProperties=false,loadIndexes=false) - quickly loads all nodes and rels into memory by skipping one page at a time

Procedure

apoc.xml

Qualified Name Type

apoc.xml.parse
RETURN apoc.xml.parse(<xml string>, <xPath string>, config, false) AS value

Function