{"openapi":"3.1.0","info":{"title":"OSCR public read API","version":"v1","description":"A free, keyless, read-only API over the Open Scientific Code Registry's catalogue. GET and HEAD only. See the guide at /help/api/ for examples, pagination, the data licence and how to cite OSCR."},"servers":[{"url":"https://openscicode.org/api/v1"}],"paths":{"/":{"get":{"operationId":"index","summary":"The API index","description":"Links to every endpoint and to the OpenAPI document. Start here.","responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"The OpenAPI document","description":"A machine-readable OpenAPI 3.1 description of every endpoint, generated from the routes themselves.","responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/stats":{"get":{"operationId":"stats","summary":"The catalogue's figures","description":"The counts the site is built from: papers, papers with code, repositories, scripts, matches, and more.","responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/paper/{doi}":{"get":{"operationId":"paper","summary":"One paper's record","description":"The record of a paper by its DOI: its code links, repositories, data links, status, tools, categories and a matches summary. No PDF and no full text (the paper is linked by its DOI). Email addresses are never shown. The DOI contains slashes: give it URL-encoded in the path, or as the ?doi= query parameter.","parameters":[{"name":"doi","in":"path","required":false,"description":"The paper's DOI, URL-encoded (or use ?doi=).","schema":{"type":"string"},"example":"10.5555%2Foscr.fixture.1"},{"name":"doi","in":"query","required":false,"description":"The paper's DOI, in place of the path (no encoding needed).","schema":{"type":"string"},"example":"10.5555/oscr.fixture.1"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/search":{"get":{"operationId":"search","summary":"Search the catalogue","description":"Full-text search over the papers, with the same query language and filters as the site's search. This is the ONLY endpoint bound by a quota: each call counts against the site's shared daily free database budget, so call it sparingly and cache its answers. Everything else (the static files and the dataset) is unlimited.","parameters":[{"name":"q","in":"query","required":false,"description":"The query (the search guide's language).","schema":{"type":"string"},"example":"eeg"},{"name":"type","in":"query","required":false,"description":"A result type filter (kept for compatibility with the site's form).","schema":{"type":"string"},"example":""},{"name":"field","in":"query","required":false,"description":"A field filter (kept for compatibility with the site's form).","schema":{"type":"string"},"example":""},{"name":"page","in":"query","required":false,"description":"The page of results (from 1).","schema":{"type":"integer"},"example":"1"},{"name":"size","in":"query","required":false,"description":"Results per page (1 to 50).","schema":{"type":"integer"},"example":"20"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/authors":{"get":{"operationId":"authors","summary":"The authors","description":"A page of the authors, and the static file that holds them all (the no-rate-limit bulk path).","parameters":[{"name":"page","in":"query","required":false,"description":"The page (from 1).","schema":{"type":"integer"},"example":"1"},{"name":"size","in":"query","required":false,"description":"Items per page (1 to 100).","schema":{"type":"integer"},"example":"50"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/journals":{"get":{"operationId":"journals","summary":"The journals","description":"A page of the journals, and the static file that holds them all.","parameters":[{"name":"page","in":"query","required":false,"description":"The page (from 1).","schema":{"type":"integer"},"example":"1"},{"name":"size","in":"query","required":false,"description":"Items per page (1 to 100).","schema":{"type":"integer"},"example":"50"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/institutions":{"get":{"operationId":"institutions","summary":"The institutions","description":"A page of the institutions, and the static file that holds them all.","parameters":[{"name":"page","in":"query","required":false,"description":"The page (from 1).","schema":{"type":"integer"},"example":"1"},{"name":"size","in":"query","required":false,"description":"Items per page (1 to 100).","schema":{"type":"integer"},"example":"50"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/tools":{"get":{"operationId":"tools","summary":"The tools and libraries","description":"A page of the tools, and the static file that holds them all.","parameters":[{"name":"page","in":"query","required":false,"description":"The page (from 1).","schema":{"type":"integer"},"example":"1"},{"name":"size","in":"query","required":false,"description":"Items per page (1 to 100).","schema":{"type":"integer"},"example":"50"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/datasets":{"get":{"operationId":"datasets","summary":"The datasets","description":"A page of the datasets, and the static file that holds them all.","parameters":[{"name":"page","in":"query","required":false,"description":"The page (from 1).","schema":{"type":"integer"},"example":"1"},{"name":"size","in":"query","required":false,"description":"Items per page (1 to 100).","schema":{"type":"integer"},"example":"50"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/{type}/{id}":{"get":{"operationId":"entity","summary":"One author, journal, institution, tool or dataset","description":"One entity by its key: an ORCID iD for an author, a ROR id for an institution, a slug for a journal, tool or dataset. `type` is one of author, journal, institution, tool, dataset (singular). The record lists the papers its page lists (the most recent, capped), with a link to search for the rest.","parameters":[{"name":"type","in":"path","required":true,"description":"author, journal, institution, tool or dataset.","schema":{"type":"string"},"example":"author"},{"name":"id","in":"path","required":true,"description":"The entity's key (ORCID iD, ROR id or slug).","schema":{"type":"string"},"example":"0000-0000-0000-0028"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/repository/{host}/{owner}/{name}":{"get":{"operationId":"repository","summary":"One code repository","description":"A repository the registry knows, by its host, owner and name (github.com/owner/name): its licence, state, pinned commit, file and script counts, languages, and the papers that cite it as their authors' code. The code text is never here: read it in the Code to Paper reader on a paper's page, or from the scripts dataset.","parameters":[{"name":"host","in":"path","required":true,"description":"The forge host.","schema":{"type":"string"},"example":"github.com"},{"name":"owner","in":"path","required":true,"description":"The owner or organisation.","schema":{"type":"string"},"example":"oscr-fixture"},{"name":"name","in":"path","required":true,"description":"The repository name.","schema":{"type":"string"},"example":"eeg-analysis"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}},"/blocks/{id}":{"get":{"operationId":"block","summary":"One code block, by its identifier","description":"A block of the authors' code linked to a paper, by its permanent identifier (oscr:b: then 13 characters, a dash and a check character): the paper's DOI, the repository, the commit read, the file, the lines, the paragraphs of the paper it was matched to, its Software Heritage identifier (SWHID, of the file as its authors published it) with its context, who linked it, and its status (current, superseded with the block that replaced it, or withdrawn). The same facts as /b/{id}.json. A mistyped identifier (its check character is wrong) is a 400.","parameters":[{"name":"id","in":"path","required":true,"description":"The block identifier, oscr:b:… (lower case is read too).","schema":{"type":"string"},"example":"oscr:b:ZHK95W68S9M1K-N"}],"responses":{"200":{"description":"The record, as JSON.","content":{"application/json":{}}},"404":{"description":"No such record.","content":{"application/json":{}}}}}}}}