[[rest-api-graph-algos]]
== Built-in Graph Algorithms ==

Neo4j comes with a number of built-in graph algorithms.
They are performed from a start node.
The traversal is controlled by the URI and the body sent with the request.

algorithm:: The algorithm to choose. If not set, default is +shortestPath+.
 +algorithm+ can have one of these values:
 * +shortestPath+
 * +allSimplePaths+
 * +allPaths+
 * +dijkstra+ (optional with +cost_property+ and +default_cost+ parameters)

max_depth:: The maximum depth as an integer for the algorithms like ShortestPath, where applicable.
Default is +1+.

include::find-all-shortest-paths.txt[]

include::find-one-of-the-shortest-paths-between-nodes.txt[]

include::execute-a-dijkstra-algorithm-with-similar-weights-on-relationships.txt[]

include::execute-a-dijkstra-algorithm-with-weights-on-relationships.txt[]

