apoc.meta.cypher.types

Prior to the release of APOC 2025.07, this function was restricted on on-premise instances. To use it on an older version, it must be unrestricted. For more details, see Installation → Load and unrestrict.
Details

Syntax

apoc.meta.cypher.types(props)

Description

Returns a MAP containing the type names of the given values.

Arguments

Name

Type

Description

props

ANY

A relationship, node or map to get the property types from.

Returns

MAP

Check types using Cypher

Cypher can check types without the use of APOC.

Cypher syntax for checking a type
RETURN valueType(1.0);

For more information, see the Cypher Manual → Value type function.

Usage Examples

Calling the function with a map input will return a map with the same keys, where the value of each key is the type of the value it had in the input map:

RETURN apoc.meta.cypher.types({
  item1: 2,
  item2: datetime(),
  item3: "Michael"
}) AS output;
Results
output

{item2: "DATE_TIME", item1: "INTEGER", item3: "STRING"}

Calling the function with an empty map will return an empty map:

RETURN apoc.meta.cypher.types({}) AS output;
Results
output

{}

Calling the function with an input value that is not a map, will return an empty map:

RETURN apoc.meta.cypher.types(1) AS output;
Results
output

{}