Public REST API

Turn any GitHub repo into a callgraph, with one request.

Give it a public GitHub URL. It clones the repo, parses every function across your languages, and hands back the full call graph as JSON — who calls whom, across files and languages. No dashboard, no client-side parsing, no waiting on a UI.

GET /callgraph?repo=github.com/owner/repo

How it works

Three steps, and the second one is entirely ours.

1

You call one endpoint

Send a GET request with a public GitHub repo URL. No auth, no request body, no SDK to install.

2

We parse the whole repo

The repo is fetched, languages are detected, and our Python/JavaScript/Java/C#/SQL parsers plus UI-route linking build a merged call graph — the same pipeline behind every CodeMD.dev analysis.

3

You get JSON back

Nodes (functions, files, routes), edges (caller → callee), and entry points — ready to feed into an agent, a graph, or your own tooling.

Request & response

A first call analyzes the repo; repeat calls for the same commit return the cached graph instantly.

Request
# curl
curl "https://www.codemd.dev/callgraph?repo=github.com/pallets/flask"
Response — 200 OK
{
  "owner_name": "pallets",
  "repo_name": "flask",
  "node_count": 812,
  "edge_count": 1304,
  "callgraph": {
    "nodes": ["flask.app.Flask.run", "..."],
    "edges": [
      ["flask.app.Flask.run", "flask.app.Flask.get_send_file_max_age"]
    ],
    "entry_points": ["..."]
  }
}
ParameterTypeDescription
repo string, required A public GitHub repo, e.g. owner/repo, github.com/owner/repo, or a full https://github.com/owner/repo URL.
force_refresh boolean, optional Set to true to re-analyze instead of returning a cached graph for the current commit.
Large repos: the first analysis of a large or remote-hosted repo can take longer than a single request should block on. In that case the endpoint responds 202 with a job_id and status_url — poll that, then call /callgraph again once it's done. Every repeat call after the first analysis returns immediately from cache.

Try it now

Runs against the live API. Small/medium public repos usually return in a few seconds on a first call.

Example: github.com/owner/repo. Public repositories only.


        

Who this is for

AI coding agents

Give an agent real call-path context — callers, callees, entry points — instead of having it re-derive structure from raw source on every run.

Codebase onboarding & docs tools

Generate architecture diagrams or "how does X call Y" answers for an unfamiliar repo without writing your own multi-language parser.

Code review & impact-analysis bots

Check what a changed function actually affects across the codebase before approving or flagging a PR.

Security & audit tooling

Trace call paths from an entry point to a sensitive function across file and language boundaries.

Want the full analysis, not just the graph?

/callgraph is a thin, JSON-only wrapper around CodeMD.dev's full repo analysis — the same one that also produces repo stats, feature summaries, UI graphs, and CODE.md. Connect a repo to see everything it generates.

Connect Repo