GitHub Packages API

The GitHub Packages API lets you manage packages and package versions in GitHub Packages, a software package hosting service that supports npm, Maven, Gradle, RubyGems, NuGet, Docker, and other package formats. The API provides endpoints to list, get, delete, and restore packages and their versions at the user, organization, and repository level.

Operations 27

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 /orgs/{org}/docker/conflicts List an org's packages that conflicted in Docker migration · GitHub Get List of Conflicting Packages During Docker Migration for Organization #
Ask an LLM
“Which of our organization's packages ran into a conflict when migrating from the Docker registry?”
“Did any org container images fail to move over cleanly during the Docker migration?”
Tell an agent
List the packages in {org} that hit a conflict during the Docker migration.
Show Docker migration conflicts for organization {org}.
GET /orgs/{org}/packages List an organization's packages · GitHub List Packages for an Organization #
Ask an LLM
“What npm, Maven or container packages does our organization publish?”
“Can I list only the private packages in an org?”
Tell an agent
List the {package_type} packages in organization {org}.
Show {visibility} {package_type} packages owned by {org}.
GET /orgs/{org}/packages/{package_type}/{package_name} Get one package owned by an organization · GitHub Get a Package for an Organization #
Ask an LLM
“What are the details of a specific package our organization publishes, like visibility and version count?”
“Can I look up one org-owned container image by name?”
Tell an agent
Show the {package_type} package {package_name} in organization {org}.
Get details for org package {package_name} ({package_type}) owned by {org}.
DELETE /orgs/{org}/packages/{package_type}/{package_name} Delete an entire organization package · GitHub Delete a Package for an Organization #
Ask an LLM
“How do I delete a whole package, every version, from our organization?”
“Can a package with more than 5,000 downloads be removed from the org?”
Tell an agent destructive · confirm first
Delete the entire {package_type} package {package_name} from organization {org}.
Remove org package {package_name} of type {package_type} from {org} completely.
POST /orgs/{org}/packages/{package_type}/{package_name}/restore Restore a deleted organization package · GitHub Restore a Package for an Organization #
Ask an LLM
“Can I bring back a package our organization deleted a couple of weeks ago?”
“How long after deleting an org package can it still be restored?”
Tell an agent
Restore the deleted {package_type} package {package_name} in organization {org}.
Undelete org package {package_name} ({package_type}) in {org} using token {token}.
GET /orgs/{org}/packages/{package_type}/{package_name}/versions List versions of an organization package · GitHub List Package Versions for a Package Owned by an Organization #
Ask an LLM
“Which versions of an organization's package have been published?”
“Can I see only the deleted versions of an org package?”
Tell an agent
List all versions of {package_type} package {package_name} in organization {org}.
Show {state} versions of org package {package_name} ({package_type}) in {org}.
GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id} Get one version of an organization package · GitHub Get a Package Version for an Organization #
Ask an LLM
“What are the details of one specific version of an org package, like its tags and creation date?”
“Can I inspect a single version of an organization's container image?”
Tell an agent
Show version {package_version_id} of {package_type} package {package_name} in organization {org}.
Get details of org package {package_name} ({package_type}) version {package_version_id} in {org}.
DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id} Delete one version of an organization package · GitHub Delete Package Version for an Organization #
Ask an LLM
“Can I delete just one bad version of an org package and keep the rest?”
“How do I remove a single published version from an organization's package?”
Tell an agent destructive · confirm first
Delete version {package_version_id} of {package_type} package {package_name} in organization {org}.
Remove only version {package_version_id} from org package {package_name} ({package_type}) in {org}.
POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore Restore a deleted organization package version · GitHub Restore Package Version for an Organization #
Ask an LLM
“Is it possible to recover a single version I deleted from an organization's package?”
“Can I undo the deletion of one org package version within 30 days?”
Tell an agent
Restore deleted version {package_version_id} of {package_type} package {package_name} in organization {org}.
Undelete org package {package_name} ({package_type}) version {package_version_id} in {org}.
GET /user/docker/conflicts List my packages that conflicted in Docker migration · GitHub Get List of Conflicting Packages During Docker Migration for… #
Ask an LLM
“Did any of my own packages hit a conflict during the Docker registry migration?”
“Which of my personal container images failed to migrate cleanly?”
Tell an agent
List my own packages that had a conflict during the Docker migration.
Show Docker migration conflicts in my personal namespace.
GET /user/packages List packages in my own namespace · GitHub List Packages for the Authenticated User's Namespace #
Ask an LLM
“What packages have I published under my own account?”
“Can I list just my public container images?”
Tell an agent
List my {package_type} packages.
Show my own {visibility} {package_type} packages.
GET /user/packages/{package_type}/{package_name} Get one of my own packages · GitHub Get a Package for the Authenticated User #
Ask an LLM
“What are the details of one package I own personally?”
“Can I look up my own npm package by name and type?”
Tell an agent
Show my {package_type} package {package_name}.
Get details of package {package_name} ({package_type}) in my own namespace.
DELETE /user/packages/{package_type}/{package_name} Delete one of my own packages · GitHub Delete a Package for the Authenticated User #
Ask an LLM
“How do I delete a package I published under my personal account?”
“Can I remove every version of my own package at once?”
Tell an agent destructive · confirm first
Delete my {package_type} package {package_name}.
Remove my personal package {package_name} ({package_type}) entirely.
POST /user/packages/{package_type}/{package_name}/restore Restore one of my deleted packages · GitHub Restore a Package for the Authenticated User #
Ask an LLM
“Can I get back a package I deleted from my own account last week?”
“What stops me from restoring a deleted personal package?”
Tell an agent
Restore my deleted {package_type} package {package_name}.
Undelete my personal package {package_name} ({package_type}) with token {token}.
GET /user/packages/{package_type}/{package_name}/versions List versions of one of my packages · GitHub List Package Versions for a Package Owned by the Authenticated User #
Ask an LLM
“Which versions of my own package exist right now?”
“Can I see the deleted versions of a package in my account?”
Tell an agent
List all versions of my {package_type} package {package_name}.
Show {state} versions of my package {package_name} ({package_type}).
GET /user/packages/{package_type}/{package_name}/versions/{package_version_id} Get one version of one of my packages · GitHub Get a Package Version for the Authenticated User #
Ask an LLM
“What's recorded about a single version of a package I own?”
“Can I check the metadata for one release of my personal package?”
Tell an agent
Show version {package_version_id} of my {package_type} package {package_name}.
Get my package {package_name} ({package_type}) release {package_version_id}.
DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id} Delete one version of one of my packages · GitHub Delete a Package Version for the Authenticated User #
Ask an LLM
“Can I delete a single broken release of my own package?”
“How do I remove one version from a package in my personal namespace?”
Tell an agent destructive · confirm first
Delete version {package_version_id} of my {package_type} package {package_name}.
Remove only release {package_version_id} from my package {package_name} ({package_type}).
POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore Restore a deleted version of one of my packages · GitHub Restore a Package Version for the Authenticated User #
Ask an LLM
“Is it possible to bring back one version I deleted from my own package?”
“Can I recover a personal package release I removed by mistake?”
Tell an agent
Restore deleted version {package_version_id} of my {package_type} package {package_name}.
Undelete release {package_version_id} of my package {package_name} ({package_type}).
GET /users/{username}/docker/conflicts List a user's packages that conflicted in Docker migration · GitHub Get List of Conflicting Packages During Docker Migration for User #
Ask an LLM
“Which of another user's packages ran into Docker migration conflicts?”
“Can I check whether a specific user's container images migrated cleanly?”
Tell an agent
List the packages owned by {username} that conflicted during the Docker migration.
Show Docker migration conflicts for user {username}.
GET /users/{username}/packages List another user's packages · GitHub List Packages for a User #
Ask an LLM
“What packages has a given user published?”
“Can I list only the public container packages of a specific user?”
Tell an agent
List the {package_type} packages owned by user {username}.
Show {visibility} {package_type} packages belonging to {username}.
GET /users/{username}/packages/{package_type}/{package_name} Get one package owned by another user · GitHub Get a Package for a User #
Ask an LLM
“What are the details of a package another user publishes?”
“Can I look up a specific user's Maven package by name?”
Tell an agent
Show {package_type} package {package_name} owned by user {username}.
Get details of {username}'s package {package_name} ({package_type}).
DELETE /users/{username}/packages/{package_type}/{package_name} Delete an entire package owned by a user · GitHub Delete a Package for a User #
Ask an LLM
“Can an admin delete an entire package owned by a specific user account?”
“How do I remove every version of a package that belongs to another user?”
Tell an agent destructive · confirm first
Delete the entire {package_type} package {package_name} owned by user {username}.
Remove {username}'s package {package_name} ({package_type}) completely.
POST /users/{username}/packages/{package_type}/{package_name}/restore Restore a deleted package owned by a user · GitHub Restore a Package for a User #
Ask an LLM
“Can I restore a whole package that was deleted from another user's account?”
“Is there a way to recover a user-owned package after it was removed?”
Tell an agent
Restore the deleted {package_type} package {package_name} owned by user {username}.
Undelete {username}'s package {package_name} ({package_type}) using token {token}.
GET /users/{username}/packages/{package_type}/{package_name}/versions List versions of a package owned by a user · GitHub List Package Versions for a Package Owned by a User #
Ask an LLM
“Which versions has another user published for one of their packages?”
“Can I see the release history of a specific user's package?”
Tell an agent
List all versions of {package_type} package {package_name} owned by user {username}.
Show the release history of {username}'s package {package_name} ({package_type}).
GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id} Get one version of a package owned by a user · GitHub Get a Package Version for a User #
Ask an LLM
“What are the details of one release of another user's package?”
“Can I inspect a single version of a package that belongs to someone else?”
Tell an agent
Show version {package_version_id} of {package_type} package {package_name} owned by user {username}.
Get {username}'s package {package_name} ({package_type}) release {package_version_id}.
DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id} Delete one version of a package owned by a user · GitHub Delete Package Version for a User #
Ask an LLM
“Can I delete a single version of a package that another user owns?”
“How does an admin remove one bad release from a user's package?”
Tell an agent destructive · confirm first
Delete version {package_version_id} of {package_type} package {package_name} owned by user {username}.
Remove only release {package_version_id} from {username}'s package {package_name} ({package_type}).
POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore Restore a deleted version of a user's package · GitHub Restore Package Version for a User #
Ask an LLM
“Is it possible to recover one deleted version of another user's package?”
“Can I restore a single release removed from a user-owned package within the 30-day window?”
Tell an agent
Restore deleted version {package_version_id} of {package_type} package {package_name} owned by user {username}.
Undelete release {package_version_id} of {username}'s package {package_name} ({package_type}).

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/packages

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-packages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

github-packages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub v3 REST Packages API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:


# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-packages-api-openapi.yml