Two-Hop Network

Returns the 2-hop network of a node `n`.


  • node (String) – The name of node n.
  • name (String) – Node name (Default: ""). If not specified, node will be matched with its assigned ID.
  • neiSize (Int) – Number of top neighbors sorted by a property to return for every node. If not specified, the full 2-hop network is returned.
  • property (String) – Edge property (Default: "").


  • network (Map[String, List[String]]) – Map of nodes and their neighbor list starting with node n.


Reading the LoTR dataset, we send a query for a 2hop-network for Aragorn and a limit of (3) neighbors.

curl -X POST \
-H "Content-Type: application/json" \
--data-binary @- << EOF

This returns the following network;

2hop-network example