GitHub Dependency Graph API

The GitHub Dependency Graph API lets you view and submit dependency information for a repository. It provides endpoints to export the software bill of materials (SBOM) for a repository and to submit dependency snapshots from build tools or package managers, enabling GitHub to generate Dependabot alerts for vulnerable dependencies.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead} Compare dependency changes between two commits · Get a diff of the dependencies between commits #
Ask an LLM
“Which dependencies were added or removed between two commits in my repo?”
“Can I see the dependency changes for just one manifest file between two revisions?”
Tell an agent
Show the dependency diff for {owner}/{repo} across {basehead}.
Compare dependencies in {owner}/{repo} for {basehead}, limited to the manifest at {name}.
GET /repos/{owner}/{repo}/dependency-graph/sbom Export a repository's SBOM · Export a software bill of materials (SBOM) for a repository #
Ask an LLM
“How do I get a software bill of materials for my GitHub repository?”
“Can I export my repo's SBOM in SPDX JSON format?”
Tell an agent
Export the SPDX software bill of materials for {owner}/{repo}.
Generate an SBOM for the {repo} repository owned by {owner}.
GET /repos/{owner}/{repo}/dependency-graph/sbom/fetch-report/{sbom_uuid} Fetch a software bill of materials (SBOM) for a repository #
GET /repos/{owner}/{repo}/dependency-graph/sbom/generate-report Request generation of a software bill of materials (SBOM) for a repository #
POST /repos/{owner}/{repo}/dependency-graph/snapshots Submit a dependency snapshot for a repository · Create a snapshot of dependencies for a repository #
Ask an LLM
“How do I submit dependencies my build detected to the dependency graph?”
“Can I upload a snapshot of resolved dependencies for a specific commit and branch?”
Tell an agent
Submit a dependency snapshot to {owner}/{repo} for commit {sha} on {ref}, scanned at {scanned}.
Upload the dependency manifests {manifests} to the dependency graph of {owner}/{repo}.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations
📖
Documentation
https://docs.github.com/en/rest/dependency-graph

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github:github-dependency-graph-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-dependency-graph-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Dependency Graph API
  version: 1.1.4
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  x-github-plan: api.github.com
  description: 'Operations tagged dependency-graph across 2 of this provider''s published API definitions: github-github-full.yml, github-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.github.com
tags:


# --- truncated at 32 KB (46 KB total) ---
# Full source: https://artifacts.apis.io/github/openapi/github-dependency-graph-api-openapi.yml