Software Heritage

App · 19 actions

Search the Software Heritage archive of public source code: look up a repository and its visits, branches, commits, releases, folders and files, resolve SWHIDs, get citations, metadata and known vulnerabilities, ask for a repository to be archived, and run a workflow when the archive visits one. No account or API key required.

Actions

ActionWhat it does
Check SWHIDs are archivedCheck which of up to 1,000 SWHIDs of files, folders, commits, releases or snapshots are in the archive.
Get archive statisticsGet how many repositories, visits, files, folders, commits, releases and authors the archive holds.
Get citationGet a citation for software in BibTeX or CSL JSON, made from its codemeta.json or CITATION.cff in the archive, with its SWHID.
Get commitGet an archived commit: its message, author, committer, dates, the commits before it and its top folder.
Get fileCheck an archived file and get its size, its SWHID and its SHA1, SHA256 and other checksums.
Get file textRead an archived text file, such as a README or source file, up to a number of bytes.
Get releaseGet an archived release (a tag): its name, message, author, date and the commit it marks.
Get repositoryCheck that a repository is in the archive and get the address it is filed under, its SWHID, how the archive reads it and its page.
Get save request statusCheck how a request to archive a repository is going, by its number, or list a repository's requests, newest first.
Get software metadataGet what a repository says about itself, read from files such as codemeta.json and package.json: name, description, version, licences, authors, languages and keywords.
Get visitGet one visit of a repository, the latest unless you give its number: when it was, how it went and the snapshot it took.
List branchesList the branches and tags in a snapshot, or in a repository's latest one, with the commit or release each points at.
List commit historyList the commits leading to a commit, starting with it and going back in time, like git log.
List folderList the files and folders in an archived folder, or in a commit's files at a path, with each one's size and SWHID.
List visitsList the times the archive read a repository, newest first: when, how it went, and the snapshot of branches and tags it took.
List vulnerabilitiesList the known security vulnerabilities, such as CVEs, that affect a commit, with their severity, references and fixing commits, from the osv.dev database.
Request an archive of a repositoryAsk Software Heritage to archive a public repository now (its Save Code Now).
Resolve SWHIDCheck that a SWHID names something in the archive and get what it is, its repository, path and lines when it says, and its page.
Search repositoriesFind repositories in the archive whose address contains some text, e.g. a project or owner name, with how often and when the archive last visited each.

Check SWHIDs are archived

Check which of up to 1,000 SWHIDs of files, folders, commits, releases or snapshots are in the archive.

Inputs

SWHIDsswhidslistRequired
The SWHIDs to check, as a list or separated by commas or new lines. Qualifiers after a ; are ignored.

Outputs

all_archivedtrue/false
True when every one is in the archive.
archived_countnumber
How many are in the archive.
countnumber
How many SWHIDs were checked.
missing_countnumber
How many are not.
resultslist
Each SWHID, in the order given.
summarytext
One line saying what was found.
Example output
{
  "all_archived": false,
  "archived_count": 2,
  "count": 3,
  "missing_count": 1,
  "results": [
    {
      "archived": true,
      "swhid": "swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
      "type": "commit"
    },
    {
      "archived": true,
      "swhid": "swh:1:dir:2775a5a092ca53c424b008fe168123c55ab1aa85",
      "type": "folder"
    },
    {
      "archived": false,
      "swhid": "swh:1:cnt:0000000000000000000000000000000000000000",
      "type": "file"
    }
  ],
  "summary": "2 of 3 are in the archive."
}

Get archive statistics

Get how many repositories, visits, files, folders, commits, releases and authors the archive holds.

Inputs

None.

Outputs

authorsnumber
How many distinct authors and committers.
commitsnumber
How many distinct commits.
filesnumber
How many distinct files it holds.
foldersnumber
How many distinct folders.
releasesnumber
How many distinct releases.
repositoriesnumber
How many repositories and packages the archive holds.
skipped_filesnumber
How many files it skipped, such as very large ones.
snapshotsnumber
How many distinct snapshots.
summarytext
One line saying what was found.
visitsnumber
How many visits it has made to them.
Example output
{
  "authors": 111378307,
  "commits": 6290094306,
  "files": 30679513558,
  "folders": 23908897342,
  "releases": 196885845,
  "repositories": 452896869,
  "skipped_files": 788693,
  "snapshots": 417231995,
  "summary": "The archive holds 30,679,513,558 files and 6,290,094,306 commits from 452,896,869 repositories.",
  "visits": 2059307217
}

Get citation

Get a citation for software in BibTeX or CSL JSON, made from its codemeta.json or CITATION.cff in the archive, with its SWHID.

Inputs

Repository or SWHIDsoftwaretextRequired
The repository's address, for its latest version, or the SWHID of a version of it.
Formatcitation_formattext
The citation's format. Defaults to BibTeX.One of: bibtex, csl (CSL JSON). Default: bibtex.

Outputs

citationtext
The citation, ready to paste into a bibliography.
formattext
bibtex or csl.
source_swhidtext
The SWHID of the file the citation was made from, such as codemeta.json or CITATION.cff.
source_urltext
Where to download that file.
summarytext
One line saying what was found.
warningtext
What the archive found wrong with that file, if anything.
Example output
{
  "citation": "@softwareversion{swh-rev-9022bdc,\n    author = \"Di Cosmo, Roberto and Danelutto, Marco\",\n    organization = \"Inria and University Paris Diderot and University of Pisa\",\n    license = \"LGPL-2.0-only\",\n    date = \"2011-07-18\",\n    year = \"2011\",\n    month = jul,\n    repository = \"git+https://github.com/rdicosmo/parmap.git\",\n    title = \"Parmap\",\n    version = \"1.2.5\",\n    swhid = \"swh:1:rev:9022bdc093f3540cede505084969311473adbb09;origin=https://github.com/rdicosmo/parmap;visit=swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf\"\n}\n",
  "format": "bibtex",
  "source_swhid": "swh:1:cnt:7104fab006bbeb57dc12f72d158fe4f2c63a9b27;origin=https://github.com/rdicosmo/parmap;visit=swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf;anchor=swh:1:rev:9022bdc093f3540cede505084969311473adbb09;path=/codemeta.json",
  "source_url": "https://archive.softwareheritage.org/api/1/content/sha1_git:7104fab006bbeb57dc12f72d158fe4f2c63a9b27/raw/",
  "summary": "Citation of https://github.com/rdicosmo/parmap in bibtex.",
  "warning": null
}

Get commit

Get an archived commit: its message, author, committer, dates, the commits before it and its top folder.

Inputs

CommitcommittextRequired
The commit's 40-character id or its SWHID (swh:1:rev:...). Its page on GitHub or GitLab works too.

Outputs

author_emailtext
The author's email address, as recorded in the commit.
author_nametext
Who wrote the change.
browse_urltext
The archive's page for it, to open in a browser.
committer_datetext
When it was committed (ISO 8601, with its time zone).
committer_emailtext
The committer's email address.
committer_nametext
Who committed it.
datetext
When the change was written (ISO 8601, with its time zone).
folder_idtext
The id of the commit's top folder, for List folder.
idtext
The commit's id, the same as Git's.
is_mergetrue/false
True for a merge commit.
messagetext
The whole commit message.
parent_idslist
The ids of the commits it follows; two or more for a merge.
summarytext
One line saying what was found.
swhidtext
The commit's SWHID, e.g. swh:1:rev:9022bdc0...
titletext
The first line of the commit message.
typetext
The version control it came from, e.g. git.
Example output
{
  "author_email": "roberto@dicosmo.org",
  "author_name": "Roberto Di Cosmo",
  "browse_url": "https://archive.softwareheritage.org/swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
  "committer_date": "2026-06-06T12:26:49+02:00",
  "committer_email": "noreply@github.com",
  "committer_name": "GitHub",
  "date": "2026-06-06T12:26:49+02:00",
  "folder_id": "2775a5a092ca53c424b008fe168123c55ab1aa85",
  "id": "9022bdc093f3540cede505084969311473adbb09",
  "is_merge": true,
  "message": "Merge pull request #116 from rdicosmo/fix/103-no-infinite-loop-on-pinning-failure\n\nsetcore: avoid infinite loop when core pinning always fails (#103)",
  "parent_ids": [
    "e09335913d101320172833f725cf87486ad8c085",
    "1c7c605ef71509053cee53946faa75de4c6b728d"
  ],
  "summary": "Commit 9022bdc093f3 by Roberto Di Cosmo on 2026-06-06T12:26:49+02:00: Merge pull request #116 from rdicosmo/fix/103-no-infinite-loop-on-pinning-failure",
  "swhid": "swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
  "title": "Merge pull request #116 from rdicosmo/fix/103-no-infinite-loop-on-pinning-failure",
  "type": "git"
}

Get file

Check an archived file and get its size, its SWHID and its SHA1, SHA256 and other checksums.

Inputs

FilefiletextRequired
The file's SWHID (swh:1:cnt:...) or id, as List folder gives them, or a checksum written as sha256:... or sha1:...

Outputs

blake2s256text
Its BLAKE2s256 checksum.
browse_urltext
The archive's page for it, to open in a browser.
sha1text
Its SHA1 checksum.
sha1_gittext
Its SHA1 Git checksum, the same as Git's blob id.
sha256text
Its SHA256 checksum.
sizenumber
Its size in bytes.
statustext
visible, or absent when the archive holds only its checksums.
summarytext
One line saying what was found.
swhidtext
The file's SWHID, e.g. swh:1:cnt:43243e2a...
Example output
{
  "blake2s256": "029f38fa367e14554e775bdbf4f50cc112d7a6df1b1d370566d6906aba59f8d2",
  "browse_url": "https://archive.softwareheritage.org/swh:1:cnt:43243e2ae91a64e252170cd922718e8c2af323b6",
  "sha1": "b2da9d1ed869c8a111d1dc8b7c85d4f63921b6b1",
  "sha1_git": "43243e2ae91a64e252170cd922718e8c2af323b6",
  "sha256": "98fc4011efba9bbe8df865124e4ebca3faae614d0b798cff0f1ccdbbbca5d7a9",
  "size": 7225,
  "status": "visible",
  "summary": "File swh:1:cnt:43243e2ae91a64e252170cd922718e8c2af323b6 is archived: 7225 bytes.",
  "swhid": "swh:1:cnt:43243e2ae91a64e252170cd922718e8c2af323b6"
}

Get file text

Read an archived text file, such as a README or source file, up to a number of bytes. Binary files are refused.

Inputs

FilefiletextRequired
The file's SWHID (swh:1:cnt:...) or id, as List folder gives them, or a checksum written as sha256:... or sha1:...
Most bytesmax_bytesnumber
Read at most this many bytes, from 1 to 1,000,000. Defaults to 100,000.From 1 to 1000000. Default: 100000.

Outputs

bytes_readnumber
How many bytes the text holds.
sizenumber
The file's whole size in bytes.
summarytext
One line saying what was found.
swhidtext
The file's SWHID, when it was named by one or its id.
texttext
The file's text, read as UTF-8.
truncatedtrue/false
True when the file is longer than Most bytes.
Example output
{
  "bytes_read": 300,
  "size": 600,
  "summary": "Read the first 300 bytes of the file.",
  "swhid": "swh:1:cnt:43243e2ae91a64e252170cd922718e8c2af323b6",
  "text": "# Parmap in a nutshell\n\nParmap is a minimalistic library allowing  to exploit multicore architecture for\nOCaml programs with minimal modifications: if you want to use your many cores to\naccelerate an   operation  which  happens   to be   a  map,  fold    or map/fold\n(map-reduce),  just use  Parmap's",
  "truncated": true
}

Get release

Get an archived release (a tag): its name, message, author, date and the commit it marks.

Inputs

ReleasereleasetextRequired
The release's SWHID (swh:1:rel:...) or id, as List branches gives them for tags.

Outputs

author_emailtext
Their email address.
author_nametext
Who made the release.
browse_urltext
The archive's page for it, to open in a browser.
datetext
When it was made (ISO 8601, with its time zone).
idtext
The release's id, the same as Git's tag id.
messagetext
The release's message.
nametext
The release's name, e.g. 1.2.5.
summarytext
One line saying what was found.
swhidtext
The release's SWHID.
target_idtext
The id of what it points at.
target_swhidtext
The SWHID of what it points at.
target_typetext
What it points at, usually revision (a commit).
Example output
{
  "author_email": "github@dicosmo.org",
  "author_name": "Roberto Di Cosmo",
  "browse_url": "https://archive.softwareheritage.org/swh:1:rel:3e7076586691d4e363689fbf5374f833289e0b98",
  "date": "2015-09-17T16:35:00+02:00",
  "id": "3e7076586691d4e363689fbf5374f833289e0b98",
  "message": "Improved autoconf\n",
  "name": "1.0-rc7",
  "summary": "Release 1.0-rc7 of 2015-09-17T16:35:00+02:00, pointing at revision a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97.",
  "swhid": "swh:1:rel:3e7076586691d4e363689fbf5374f833289e0b98",
  "target_id": "a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97",
  "target_swhid": "swh:1:rev:a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97",
  "target_type": "revision"
}

Get repository

Check that a repository is in the archive and get the address it is filed under, its SWHID, how the archive reads it and its page.

Inputs

RepositoryrepositorytextRequired
The repository's address, e.g. https://github.com/rdicosmo/parmap. A clone address or a page inside the repository works too.

Outputs

browse_urltext
The archive's page for the repository.
summarytext
One line saying what was found.
swhidtext
The repository's SWHID, e.g. swh:1:ori:8903a90c...
urltext
The repository's address, as the archive files it.
visit_typeslist
How the archive reads it, e.g. git.
Example output
{
  "browse_url": "https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/rdicosmo/parmap",
  "summary": "https://github.com/rdicosmo/parmap is in the Software Heritage archive, visited as git, git-checkout.",
  "swhid": "swh:1:ori:8903a90cff8f07159be7aed69f19d66d33db3f86",
  "url": "https://github.com/rdicosmo/parmap",
  "visit_types": [
    "git",
    "git-checkout"
  ]
}

Get save request status

Check how a request to archive a repository is going, by its number, or list a repository's requests, newest first.

Inputs

Save request or repositoryrequesttextRequired
The save request's number, as Request an archive gives it, or a repository's address for its requests.
Kind of repositoryvisit_typetext
The version control the repository uses. Defaults to Git.One of: git, hg (Mercurial), svn (Subversion), bzr (Bazaar), cvs, tarball (Tarball (a .tar.gz or .zip file)). Default: git.
Most requestslimitnumber
For a repository, how many requests to list, from 1 to 100. Defaults to 10.From 1 to 100. Default: 10.

Outputs

countnumber
How many save requests are listed.
notetext
Why the request was rejected or failed, when it says.
repositorytext
The repository to archive.
request_idnumber
The save request's number, for Get save request.
request_statustext
accepted, rejected, or pending while Software Heritage checks an address it doesn't know.
requested_attext
When the request was made (ISO 8601, UTC).
requestslist
The save requests, newest first; the fields above are the newest's.
snapshot_swhidtext
The SWHID of the snapshot it took, once it has.
summarytext
One line saying what was found.
task_statustext
Where the archiving is: not created, pending, scheduled, running, succeeded or failed.
totalnumber
How many there are for the repository in all.
visit_datetext
When the visit was made (ISO 8601, UTC).
visit_statustext
How the visit ended, once it has: full, partial or failed.
visit_typetext
Its kind: git, hg, svn, bzr, cvs or tarball.
Example output
{
  "count": 2,
  "note": null,
  "repository": "https://github.com/rdicosmo/parmap",
  "request_id": 2607819,
  "request_status": "accepted",
  "requested_at": "2026-11-02T19:06:33.711966+00:00",
  "requests": [
    {
      "note": null,
      "repository": "https://github.com/rdicosmo/parmap",
      "request_id": 2607819,
      "request_status": "accepted",
      "requested_at": "2026-11-02T19:06:33.711966+00:00",
      "snapshot_swhid": null,
      "summary": "Save request 2607819 for https://github.com/rdicosmo/parmap: accepted, archiving pending.",
      "task_status": "pending",
      "visit_date": null,
      "visit_status": null,
      "visit_type": "git"
    },
    {
      "note": null,
      "repository": "https://github.com/rdicosmo/parmap",
      "request_id": 2607812,
      "request_status": "accepted",
      "requested_at": "2026-11-02T18:56:22.453274+00:00",
      "snapshot_swhid": "swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
      "summary": "Save request 2607812 for https://github.com/rdicosmo/parmap: accepted, archiving succeeded.",
      "task_status": "succeeded",
      "visit_date": "2026-11-02T18:56:28.959000+00:00",
      "visit_status": "full",
      "visit_type": "git"
    }
  ],
  "snapshot_swhid": null,
  "summary": "Save request 2607819 for https://github.com/rdicosmo/parmap: accepted, archiving pending.",
  "task_status": "pending",
  "total": 2,
  "visit_date": null,
  "visit_status": null,
  "visit_type": "git"
}

Get software metadata

Get what a repository says about itself, read from files such as codemeta.json and package.json: name, description, version, licences, authors, languages and keywords.

Inputs

RepositoryrepositorytextRequired
The repository's address, e.g. https://github.com/rdicosmo/parmap. A clone address or a page inside the repository works too.

Outputs

authorslist
Its authors.
code_repositorytext
Where its code lives, as it says.
date_createdtext
When it was created, as it says.
date_modifiedtext
When it was last changed, as it says.
date_publishedtext
When it was first published, as it says.
descriptiontext
What it does, in its own words.
homepagetext
Its home page.
issue_trackertext
Where to report problems.
keywordslist
Its keywords.
licenseslist
Its licences, as SPDX ids where it gives them, e.g. MIT.
nametext
The software's name.
programming_languageslist
The languages it is written in.
repositorytext
The repository's address.
summarytext
One line saying what was found.
versiontext
Its version.
Example output
{
  "authors": [
    {
      "affiliation": "Inria and University Paris Diderot",
      "email": "roberto@dicosmo.org",
      "id": "https://orcid.org/0000-0002-7493-5349",
      "name": "Roberto Di Cosmo"
    },
    {
      "affiliation": "University of Pisa",
      "email": "marco.danelutto@unipi.it",
      "id": "https://orcid.org/0000-0002-7433-376X",
      "name": "Marco Danelutto"
    }
  ],
  "code_repository": "git+https://github.com/rdicosmo/parmap.git",
  "date_created": null,
  "date_modified": "2022-01-03",
  "date_published": "2011-07-18",
  "description": null,
  "homepage": null,
  "issue_tracker": "https://github.com/rdicosmo/parmap/issues",
  "keywords": [],
  "licenses": [
    "LGPL-2.0-only"
  ],
  "name": "Parmap",
  "programming_languages": [
    "OCaml"
  ],
  "repository": "https://github.com/rdicosmo/parmap",
  "summary": "Parmap: 2 authors, licence LGPL-2.0-only.",
  "version": "1.2.5"
}

Get visit

Get one visit of a repository, the latest unless you give its number: when it was, how it went and the snapshot it took.

Inputs

RepositoryrepositorytextRequired
The repository's address, e.g. https://github.com/rdicosmo/parmap. A clone address or a page inside the repository works too.
Visit numbervisitnumber
The visit's number. Leave blank for the latest.At least 1.
Visit typevisit_typetext
Only visits of this type, e.g. git. Get repository lists a repository's types. Leave blank for any.
Only complete visitsrequire_snapshottrue/false
For the latest visit, skip visits still running or that took no snapshot. Defaults to yes.Default: true.

Outputs

browse_urltext
The archive's page for it, to open in a browser.
datetext
When the visit started (ISO 8601, UTC).
repositorytext
The address of the repository visited.
snapshot_idtext
The id of the snapshot the visit took: every branch and tag it found. Empty when it took none.
snapshot_swhidtext
The snapshot's SWHID, e.g. swh:1:snp:6146f8ce...
statustext
How the visit ended: full, partial, failed or not_found, or created or ongoing while it runs.
summarytext
One line saying what was found.
visitnumber
The visit's number, counting up from 1 for each repository.
visit_typetext
How the archive read the repository, e.g. git, or git-checkout for a package's source.
Example output
{
  "browse_url": "https://archive.softwareheritage.org/swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
  "date": "2026-11-02T18:56:28.959000+00:00",
  "repository": "https://github.com/rdicosmo/parmap",
  "snapshot_id": "6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
  "snapshot_swhid": "swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
  "status": "full",
  "summary": "Visit 2534 of https://github.com/rdicosmo/parmap on 2026-11-02T18:56:28.959000+00:00 (git): full.",
  "visit": 2534,
  "visit_type": "git"
}

List branches

List the branches and tags in a snapshot, or in a repository's latest one, with the commit or release each points at. HEAD shows the default branch's latest commit.

Inputs

Snapshot or repositorysnapshottextRequired
A snapshot's SWHID (swh:1:snp:...) or id, as a visit gives them, or a repository's address for its latest snapshot.
Branch typesbranch_typeslist
Only branches pointing at these. Leave blank for all.One or more of: revision (Commits (branches)), release (Releases (tags)), alias (Aliases, such as HEAD), directory (Folders), content (Files), snapshot (Snapshots).
Start fromstart_fromtext
List branches from this name on, alphabetically, e.g. refs/tags/. Each answer gives the name to use next.
Most brancheslimitnumber
How many to list, from 1 to 1000. Defaults to 100.From 1 to 1000. Default: 100.

Outputs

brancheslist
The branches and tags, by name.
browse_urltext
The archive's page for it, to open in a browser.
countnumber
How many branches are listed.
has_moretrue/false
True when there are more branches.
next_branchtext
Give this as Start from to list the next ones.
repositorytext
The repository whose latest snapshot this is, when a repository was given.
snapshot_idtext
The snapshot's id.
snapshot_swhidtext
The snapshot's SWHID.
summarytext
One line saying what was found.
Example output
{
  "branches": [
    {
      "alias_of": "refs/heads/master",
      "name": "HEAD",
      "target_id": "9022bdc093f3540cede505084969311473adbb09",
      "target_swhid": "swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
      "target_type": "revision"
    },
    {
      "alias_of": null,
      "name": "refs/heads/Drup-dune",
      "target_id": "312998462027e0ca6278d0eed3bc36ae9099db8d",
      "target_swhid": "swh:1:rev:312998462027e0ca6278d0eed3bc36ae9099db8d",
      "target_type": "revision"
    },
    {
      "alias_of": null,
      "name": "refs/heads/UnixJunkie-patch-1",
      "target_id": "dd932dcf58fecc4871847e46745f32a2137cdfea",
      "target_swhid": "swh:1:rev:dd932dcf58fecc4871847e46745f32a2137cdfea",
      "target_type": "revision"
    },
    {
      "alias_of": null,
      "name": "refs/heads/diml-master",
      "target_id": "99d9d23e80e3bdd196ea0eda76e60b51423416c7",
      "target_swhid": "swh:1:rev:99d9d23e80e3bdd196ea0eda76e60b51423416c7",
      "target_type": "revision"
    },
    {
      "alias_of": null,
      "name": "refs/heads/fastarraymap",
      "target_id": "0a176436462903e284ece51dfa2789354b16905b",
      "target_swhid": "swh:1:rev:0a176436462903e284ece51dfa2789354b16905b",
      "target_type": "revision"
    }
  ],
  "browse_url": "https://archive.softwareheritage.org/swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
  "count": 5,
  "has_more": true,
  "next_branch": "refs/heads/feat/77-no-fork-on-ncores-1",
  "repository": null,
  "snapshot_id": "6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
  "snapshot_swhid": "swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
  "summary": "Listed 5 branches of snapshot 6146f8cebe5245a915c21ad9186ddb0acecbd1bf."
}

List commit history

List the commits leading to a commit, starting with it and going back in time, like git log.

Inputs

CommitcommittextRequired
The commit's 40-character id or its SWHID (swh:1:rev:...). Its page on GitHub or GitLab works too.
Most commitslimitnumber
How many commits to list, from 1 to 1000. Defaults to 10.From 1 to 1000. Default: 10.

Outputs

commit_idtext
The commit the history leads to.
commitslist
The commits, starting with the one given and going back in time.
countnumber
How many commits are listed.
summarytext
One line saying what was found.
Example output
{
  "commit_id": "9022bdc093f3540cede505084969311473adbb09",
  "commits": [
    {
      "author_email": "roberto@dicosmo.org",
      "author_name": "Roberto Di Cosmo",
      "browse_url": "https://archive.softwareheritage.org/swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
      "committer_date": "2026-06-06T12:26:49+02:00",
      "committer_email": "noreply@github.com",
      "committer_name": "GitHub",
      "date": "2026-06-06T12:26:49+02:00",
      "folder_id": "2775a5a092ca53c424b008fe168123c55ab1aa85",
      "id": "9022bdc093f3540cede505084969311473adbb09",
      "is_merge": true,
      "message": "Merge pull request #116 from rdicosmo/fix/103-no-infinite-loop-on-pinning-failure\n\nsetcore: avoid infinite loop when core pinning always fails (#103)",
      "parent_ids": [
        "e09335913d101320172833f725cf87486ad8c085",
        "1c7c605ef71509053cee53946faa75de4c6b728d"
      ],
      "swhid": "swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
      "title": "Merge pull request #116 from rdicosmo/fix/103-no-infinite-loop-on-pinning-failure",
      "type": "git"
    },
    {
      "author_email": "roberto@dicosmo.org",
      "author_name": "Roberto Di Cosmo",
      "browse_url": "https://archive.softwareheritage.org/swh:1:rev:e09335913d101320172833f725cf87486ad8c085",
      "committer_date": "2026-04-25T01:35:30+02:00",
      "committer_email": "noreply@github.com",
      "committer_name": "GitHub",
      "date": "2026-04-25T01:35:30+02:00",
      "folder_id": "86deca89e02b8c0a50396fd96e33d2836362fa3c",
      "id": "e09335913d101320172833f725cf87486ad8c085",
      "is_merge": true,
      "message": "Merge pull request #117 from rdicosmo/feat/77-no-fork-on-ncores-1\n\nparmap: skip fork when ~ncores=1 (#77)",
      "parent_ids": [
        "ecd3744ed558da4ea2bf9eb87b80b8949f417126",
        "79db0f03206422038aec8d36bd0039c43ce17f28"
      ],
      "swhid": "swh:1:rev:e09335913d101320172833f725cf87486ad8c085",
      "title": "Merge pull request #117 from rdicosmo/feat/77-no-fork-on-ncores-1",
      "type": "git"
    }
  ],
  "count": 2,
  "summary": "Listed 2 commits leading to 9022bdc093f3, newest first."
}

List folder

List the files and folders in an archived folder, or in a commit's files at a path, with each one's size and SWHID. A path to a file gives that one file.

Inputs

Folder or commitfoldertextRequired
A folder's or a commit's SWHID (swh:1:dir:... or swh:1:rev:...) or id. A commit lists its top folder.
Pathpathtext
A folder or file inside it, e.g. src or docs/README.md. Leave blank for the folder itself.

Outputs

browse_urltext
The archive's page for it, to open in a browser.
countnumber
How many entries are listed.
entrieslist
What the folder holds, or the one file the path names.
file_countnumber
How many of them are files.
folder_countnumber
How many of them are folders.
folder_idtext
The id of the folder listed, when it is a folder.
folder_swhidtext
Its SWHID.
pathtext
The path given, from the top folder; empty for the top.
summarytext
One line saying what was found.
typetext
folder, or file when the path names a file.
Example output
{
  "browse_url": "https://archive.softwareheritage.org/swh:1:dir:2775a5a092ca53c424b008fe168123c55ab1aa85",
  "count": 4,
  "entries": [
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:cnt:8d9ac6745d9e09a76bee9254569c07296420dd33",
      "id": "8d9ac6745d9e09a76bee9254569c07296420dd33",
      "name": ".gitignore",
      "size": 38,
      "swhid": "swh:1:cnt:8d9ac6745d9e09a76bee9254569c07296420dd33",
      "type": "file"
    },
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:cnt:0164c78f68e74c1950bb15bb65f26af85409be1b",
      "id": "0164c78f68e74c1950bb15bb65f26af85409be1b",
      "name": "AUTHORS",
      "size": 722,
      "swhid": "swh:1:cnt:0164c78f68e74c1950bb15bb65f26af85409be1b",
      "type": "file"
    },
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:cnt:6b04cd329678804c29f57c396dc80673f51e6122",
      "id": "6b04cd329678804c29f57c396dc80673f51e6122",
      "name": "CHANGES",
      "size": 1821,
      "swhid": "swh:1:cnt:6b04cd329678804c29f57c396dc80673f51e6122",
      "type": "file"
    },
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:cnt:1236c69684fe78ffa93fe0c712b28e7db2e1dec0",
      "id": "1236c69684fe78ffa93fe0c712b28e7db2e1dec0",
      "name": "LICENSE",
      "size": 26457,
      "swhid": "swh:1:cnt:1236c69684fe78ffa93fe0c712b28e7db2e1dec0",
      "type": "file"
    }
  ],
  "file_count": 4,
  "folder_count": 0,
  "folder_id": "2775a5a092ca53c424b008fe168123c55ab1aa85",
  "folder_swhid": "swh:1:dir:2775a5a092ca53c424b008fe168123c55ab1aa85",
  "path": "",
  "summary": "Listed 4 entries of the top folder: 4 files.",
  "type": "folder"
}

List visits

List the times the archive read a repository, newest first: when, how it went, and the snapshot of branches and tags it took.

Inputs

RepositoryrepositorytextRequired
The repository's address, e.g. https://github.com/rdicosmo/parmap. A clone address or a page inside the repository works too.
Most visitslimitnumber
How many visits to list, from 1 to 100. Defaults to 25.From 1 to 100. Default: 25.
Before visitbefore_visitnumber
Only visits older than this visit number, to read further back. Each answer gives the number to use next.At least 1.

Outputs

countnumber
How many visits are listed.
has_moretrue/false
True when there are older visits.
next_before_visitnumber
Give this as Before visit to list the older ones.
repositorytext
The repository's address.
summarytext
One line saying what was found.
visitslist
The visits, newest first.
Example output
{
  "count": 3,
  "has_more": true,
  "next_before_visit": 2532,
  "repository": "https://github.com/rdicosmo/parmap",
  "summary": "Listed 3 archive visits of https://github.com/rdicosmo/parmap, newest first.",
  "visits": [
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
      "date": "2026-11-02T18:56:28.959000+00:00",
      "repository": "https://github.com/rdicosmo/parmap",
      "snapshot_id": "6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
      "snapshot_swhid": "swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
      "status": "full",
      "visit": 2534,
      "visit_type": "git"
    },
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:snp:2128ed4f25f2d7ae7c8b7950a611d69cf4429063",
      "date": "2026-11-02T12:47:17.005000+00:00",
      "repository": "https://github.com/rdicosmo/parmap",
      "snapshot_id": "2128ed4f25f2d7ae7c8b7950a611d69cf4429063",
      "snapshot_swhid": "swh:1:snp:2128ed4f25f2d7ae7c8b7950a611d69cf4429063",
      "status": "full",
      "visit": 2533,
      "visit_type": "git-checkout"
    },
    {
      "browse_url": "https://archive.softwareheritage.org/swh:1:snp:2128ed4f25f2d7ae7c8b7950a611d69cf4429063",
      "date": "2026-11-02T00:35:01.038000+00:00",
      "repository": "https://github.com/rdicosmo/parmap",
      "snapshot_id": "2128ed4f25f2d7ae7c8b7950a611d69cf4429063",
      "snapshot_swhid": "swh:1:snp:2128ed4f25f2d7ae7c8b7950a611d69cf4429063",
      "status": "full",
      "visit": 2532,
      "visit_type": "git-checkout"
    }
  ]
}

List vulnerabilities

List the known security vulnerabilities, such as CVEs, that affect a commit, with their severity, references and fixing commits, from the osv.dev database.

Inputs

CommitcommittextRequired
The commit's 40-character id or its SWHID (swh:1:rev:...). Its page on GitHub or GitLab works too.

Outputs

commit_idtext
The commit checked.
countnumber
How many known vulnerabilities affect it.
summarytext
One line saying what was found.
vulnerabilitieslist
The vulnerabilities, one per identifier.
Example output
{
  "commit_id": "45a9f284641a23baa142743d8a6136d4e300c465",
  "count": 1,
  "summary": "1 known vulnerabilities affect commit 45a9f284641a.",
  "vulnerabilities": [
    {
      "aliases": [],
      "details": "ohmyzsh is vulnerable to Improper Neutralization of Special Elements used in an OS Command",
      "fixed_in": [
        "6cb41b70a6d04301fd50cd5862ecd705ba226c0e"
      ],
      "id": "CVE-2021-3934",
      "modified": "2026-03-13T21:53:09.633331672Z",
      "published": "2021-11-12T12:15:07.460Z",
      "references": [
        "https://huntr.dev/bounties/ad2b5c3f-a3ce-4407-94dc-354c723310ce",
        "https://github.com/ohmyzsh/ohmyzsh/commit/6cb41b70a6d04301fd50cd5862ecd705ba226c0e"
      ],
      "severity": [
        "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
      ],
      "source": "osv.dev",
      "summary": "ohmyzsh is vulnerable to Improper Neutralization of Special Elements used in an OS Command"
    }
  ]
}

Request an archive of a repository

Ask Software Heritage to archive a public repository now (its Save Code Now). Well known forges such as GitHub are accepted at once; other addresses wait for a check.

Inputs

RepositoryrepositorytextRequired
The repository's address, e.g. https://github.com/rdicosmo/parmap. A clone address or a page inside the repository works too.
Kind of repositoryvisit_typetext
The version control the repository uses. Defaults to Git.One of: git, hg (Mercurial), svn (Subversion), bzr (Bazaar), cvs, tarball (Tarball (a .tar.gz or .zip file)). Default: git.

Outputs

notetext
Why the request was rejected or failed, when it says.
repositorytext
The repository to archive.
request_idnumber
The save request's number, for Get save request.
request_statustext
accepted, rejected, or pending while Software Heritage checks an address it doesn't know.
requested_attext
When the request was made (ISO 8601, UTC).
snapshot_swhidtext
The SWHID of the snapshot it took, once it has.
summarytext
One line saying what was found.
task_statustext
Where the archiving is: not created, pending, scheduled, running, succeeded or failed.
visit_datetext
When the visit was made (ISO 8601, UTC).
visit_statustext
How the visit ended, once it has: full, partial or failed.
visit_typetext
Its kind: git, hg, svn, bzr, cvs or tarball.
Example output
{
  "note": null,
  "repository": "https://github.com/rdicosmo/parmap",
  "request_id": 2607819,
  "request_status": "accepted",
  "requested_at": "2026-11-02T19:06:33.711966+00:00",
  "snapshot_swhid": null,
  "summary": "Save request 2607819 for https://github.com/rdicosmo/parmap: accepted, archiving pending.",
  "task_status": "pending",
  "visit_date": null,
  "visit_status": null,
  "visit_type": "git"
}

Resolve SWHID

Check that a SWHID names something in the archive and get what it is, its repository, path and lines when it says, and its page.

Inputs

SWHIDswhidtextRequired
A SWHID, with or without qualifiers, e.g. swh:1:rev:9022bdc0...;origin=https://github.com/rdicosmo/parmap.

Outputs

anchortext
The commit or release it was reached from, when the SWHID says.
browse_urltext
The archive's page for it.
linestext
The lines of a file it points at, e.g. 9-15, when it says.
object_idtext
The id of what it names.
object_typetext
What it names: file, folder, commit, release or snapshot.
origintext
The repository it was found in, when the SWHID says.
pathtext
Its path in that commit or release, when the SWHID says.
summarytext
One line saying what was found.
swhidtext
The SWHID without its qualifiers.
visittext
The snapshot SWHID of the visit, when the SWHID says.
Example output
{
  "anchor": null,
  "browse_url": "https://archive.softwareheritage.org/browse/revision/9022bdc093f3540cede505084969311473adbb09/?origin_url=https://github.com/rdicosmo/parmap",
  "lines": null,
  "object_id": "9022bdc093f3540cede505084969311473adbb09",
  "object_type": "commit",
  "origin": "https://github.com/rdicosmo/parmap",
  "path": null,
  "summary": "swh:1:rev:9022bdc093f3540cede505084969311473adbb09 is an archived commit.",
  "swhid": "swh:1:rev:9022bdc093f3540cede505084969311473adbb09",
  "visit": null
}

Search repositories

Find repositories in the archive whose address contains some text, e.g. a project or owner name, with how often and when the archive last visited each. Returns a page at a time.

Inputs

Address containstexttextRequired
Text the repository's address contains, e.g. rdicosmo/parmap or parmap. Case doesn't matter.
Only archivedonly_archivedtrue/false
Only repositories the archive has visited at least once. Defaults to yes.Default: true.
Visit typevisit_typetext
Only visits of this type, e.g. git. Get repository lists a repository's types. Leave blank for any.
Most resultslimitnumber
How many repositories to return, from 1 to 1000. Defaults to 25.From 1 to 1000. Default: 25.
Next pagepage_tokentext
To read the next page, the Next page token the previous search returned. Leave blank for the first page.

Outputs

countnumber
How many repositories this page lists.
has_moretrue/false
True when there is another page.
next_page_tokentext
Give this as Next page to read the next page.
repositorieslist
The repositories found.
summarytext
One line saying what was found.
texttext
The text searched for.
totalnumber
How many repositories match in all, when the archive says.
Example output
{
  "count": 1,
  "has_more": true,
  "next_page_token": "gsQFc2NvcmXLQDDzrv9cbBLEBHNoYTHZKGUwMGNkMmM3N2E2NTBhNGY0ZGNmMWE3MDZjZmQ3Mjg0ZmRlODQ3N2I=",
  "repositories": [
    {
      "browse_url": "https://archive.softwareheritage.org/browse/origin/?origin_url=https://github.com/rdicosmo/parmap.git",
      "has_visits": true,
      "last_change_date": "2026-10-29T12:05:48.013317Z",
      "last_visit_date": "2026-10-31T11:56:50.187830+00:00",
      "snapshot_swhid": "swh:1:snp:6146f8cebe5245a915c21ad9186ddb0acecbd1bf",
      "url": "https://github.com/rdicosmo/parmap.git",
      "visit_count": 6,
      "visit_types": [
        "git"
      ]
    }
  ],
  "summary": "Found 1 archived repositories whose address contains 'rdicosmo/parmap'.",
  "text": "rdicosmo/parmap",
  "total": 8
}

On this page