# Knotwork Link Graph Analyser > Degree, groups, shortest path and PageRank for any link graph — find hubs and orphans. Paste the links between your pages, issues, notes or any other items — as an edge list (“A -> B”) or JSON with nodes and edges — and get the number of links per item (in, out and total), the connected groups, the most linked hubs, the most central items by PageRank, the orphans nobody links to and, if you name two items, the shortest chain of links between them. The same analysis Knotwork runs on a workspace graph. Part of usefulweb.app (https://usefulweb.app/). Part of [Knotwork](https://knotwork.usefulweb.app/) (ownerApp: knotwork). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://knotworklinkgraph.usefulweb.app/ (interactive tool at https://knotworklinkgraph.usefulweb.app/tool) - JSON API: POST https://knotworklinkgraph.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://knotworklinkgraph.usefulweb.app/api/v1/tool) - OpenAPI: https://knotworklinkgraph.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://knotworklinkgraph.usefulweb.app/mcp - tool `knotwork_link_graph` ## Inputs - graph (textarea, required): Links (one per line: from -> to) or graph JSON - Lines like “A -> B”, “A → B”, “A, B” or tab-separated. A line with one name adds an item without links; # starts a comment. JSON: { "nodes": [{ "id", "title", "kind" }], "edges": [{ "from", "to", "kind" }] } — the format Knotwork exports. At most 20,000 nodes and 100,000 links. - from (text): Path from (node id, optional) - to (text): Path to (node id, optional) - directed (boolean): Path follows link direction only - top (number): Hubs and PageRank: show the top - damping (number): PageRank damping factor - Probability that the random surfer follows a link instead of jumping anywhere. 0.85 is the classic value. ## Method - Links are directed (from → to). Duplicate links and self-loops are counted once / ignored; end points that are not listed as nodes are added. - Degree = number of distinct items linked with an item in either direction; in/out count links that point to / leave it. Hubs are sorted by degree, then incoming links, then input order. - Connected groups (weakly connected components) and the shortest path use breadth-first search with neighbours in input order, so the same input always gives the same path. The path ignores link direction unless you tick the option. - PageRank: power iteration of r = (1 − d)/N + d · (Σ r(j)/out(j) over items j linking here + r(dangling)/N), where items without outgoing links spread their rank over all items; it stops when the total change is below 10⁻¹⁰ (at most 200 rounds). Scores sum to 1. - Orphans are items with no link at all. Density = links ÷ (N · (N − 1)).