Below you can find a list of the available endpoints for version 1 of the Software Heritage API. For a more general introduction please refer to the API overview.

Endpoints marked "available" are considered stable for the current version of the API; endpoints marked "upcoming" are work in progress that will be stabilized in the near future.

Archive

Endpoint Description
/api/1/content/

Get information about a content (aka a "blob") object

/api/1/content/raw/

Get the raw content of a content object (aka a "blob"), as a byte sequence.

/api/1/directory/

Get information about directory objects

/api/1/known/

Check if a list of objects are present in the Software Heritage archive

/api/1/origin/

Get information about a software origin.

/api/1/origin/search/

Search for software origins whose urls contain a provided string pattern or match a provided regular expression

/api/1/origin/visit/

Get information about a specific visit of a software origin.

/api/1/origin/visit/latest/

Get information about the latest visit of a software origin.

/api/1/origin/visits/

Get information about all visits of a software origin

/api/1/origins/

Get list of archived software origins

/api/1/raw/

Get the object corresponding to the SWHID in raw form

/api/1/release/

Get information about a release in the archive

/api/1/resolve/

Resolve a SoftWare Hash IDentifier (SWHID)

/api/1/revision/

Get information about a revision in the archive

/api/1/revision/directory/

Get information about directory (entry) objects associated to revisions

/api/1/revision/log/

Get a list of all revisions heading to a given one, in other words show the commit log

/api/1/snapshot/

Get information about a snapshot in the archive

Batch download

Endpoint Description
/api/1/vault/directory/ (deprecated)
/api/1/vault/flat/

Request the cooking of a simple archive, typically for a directory

/api/1/vault/flat/raw/

Fetch the cooked archive for a flat bundle

/api/1/vault/git-bare/

Request the cooking of a git-bare archive or check its cooking status

/api/1/vault/git-bare/raw/

Fetch the cooked git-bare archive for a revision

/api/1/vault/gitfast/

Request the cooking of a gitfast archive for a revision or check its cooking status

/api/1/vault/gitfast/raw/

Fetch the cooked gitfast archive for a revision

/api/1/vault/revision/gitfast/ (deprecated)

External IDentifiers

Endpoint Description
/api/1/extid/

Get information about an external identifier

/api/1/extid/target/

Get information about external identifiers targeting an archived object

Metadata

Endpoint Description
/api/1/content/filetype/

Get information about the detected MIME type of a content object.

/api/1/content/language/

Get information about the programming language used in a content object

/api/1/content/license/

Get information about the license of a content object.

/api/1/origin/intrinsic-metadata/

Get intrinsic metadata of a software origin (as a JSON-LD/CodeMeta dictionary).

Search for software origins whose metadata (expressed as a JSON-LD/CodeMeta dictionary) match the provided criteria

/api/1/raw-extrinsic-metadata/origin/authorities/

Similar to /api/1/raw-extrinsic-metadata/swhid/authorities/ but to get metadata on origins instead of objects

/api/1/raw-extrinsic-metadata/swhid/

Returns raw extrinsic metadata collected on a given object.

/api/1/raw-extrinsic-metadata/swhid/authorities/

Returns a list of metadata authorities that provided metadata on the given target

Request archival

Endpoint Description
/api/1/add-forge/request/create

Create a new request to add a forge to the list of those crawled regularly by Software Heritage

/api/1/add-forge/request/get

Return all details about an add-forge request.

/api/1/add-forge/request/list

List add forge requests submitted by users.

/api/1/origin/save/

Request the saving of a software origin into the archive or check the status of previously created save requests

/api/1/origin/save/webhook/bitbucket/

Webhook receiver for Bitbucket to request or update the archival of a repository when new commits are pushed to it

/api/1/origin/save/webhook/gitea/

Webhook receiver for Gitea to request or update the archival of a repository when new commits are pushed to it

/api/1/origin/save/webhook/github/

Webhook receiver for GitHub to request or update the archival of a repository when new commits are pushed to it

/api/1/origin/save/webhook/gitlab/

Webhook receiver for GitLab to request or update the archival of a repository when new commits are pushed to it

/api/1/origin/save/webhook/sourceforge/

Webhook receiver for SourceForge to request or update the archival of a repository when new commits are pushed to it

Miscellaneous

Endpoint Description
/api/1/graph/

Provide fast access to the graph representation of the Software Heritage archive

/api/1/ping/

A simple endpoint used to check if the API is working.

/api/1/stat/counters/

Get statistics about the content of the archive.

back to top