{"openapi":"3.1.0","info":{"title":"LibCorpus API","version":"1.0.0","summary":"The data behind the figures of open-access physics papers, one CSV per plotted panel.","description":"LibCorpus serves the figure data of open-access papers in quantum science and technology. Every plotted panel is a CSV with its columns, provenance and licence; every paper and panel has a stable page, a Markdown digest and a JSON record.\n\nNo key, no registration. Requests from any origin are answered (CORS). The machine-facing routes share a ceiling of 600 requests a minute per client; beyond it the server answers 429 with a Retry-After header.\n\nStability: the v1 URL shapes and the fields of their responses do not change. Fields may be added. Data stays under the licence shown on each paper's page; cite the original paper and give the panel's URL.\n\nA plain-text guide for language models is at https://libcorpus.org/llms.txt. The same corpus is available as a tool for AI assistants over the Model Context Protocol at https://libcorpus.org/mcp (Streamable HTTP, stateless, no authentication): add that address as a remote MCP server in Claude, ChatGPT, Cursor or any MCP client and it gains search_papers, list_papers, get_paper, get_panel, get_panel_data and cite.","contact":{"name":"LibCorpus","email":"contact@libcorpus.org","url":"https://libcorpus.org/about"}},"servers":[{"url":"https://libcorpus.org"}],"tags":[{"name":"papers","description":"The corpus and one paper at a time."},{"name":"panels","description":"One panel: what it plots, its columns, its files."},{"name":"files","description":"The panel's files as files: CSV, JSON, SVG."},{"name":"search","description":"Find a paper or a panel."},{"name":"citations","description":"Ready-made citations."},{"name":"text","description":"Plain-text and Markdown views for language models."}],"paths":{"/api/v1":{"get":{"tags":["papers"],"summary":"Entry point","operationId":"root","responses":{"200":{"description":"Links to the corpus, the search and the documentation.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/papers":{"get":{"tags":["papers"],"summary":"List every paper in the corpus","operationId":"listPapers","responses":{"200":{"description":"Every published paper, newest first, with counts and links.","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"papers":{"type":"array","items":{"$ref":"#/components/schemas/PaperSummary"}}}}}}}}}},"/api/v1/papers/{paperId}":{"get":{"tags":["papers"],"summary":"One paper with every figure and panel","description":"Everything about a paper in one call: metadata, abstract, licence, citation, and each figure with its panels, their descriptions, file URLs and links. Use this first; then fetch the panel record or the CSV you need.","operationId":"getPaper","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}}],"responses":{"200":{"description":"The paper.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paper"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/papers/{paperId}/figures/{fig}/panels/{panel}":{"get":{"tags":["panels"],"summary":"One panel: columns, files, licence, citation","description":"What an agent needs to plot the panel: its description, plot type, the columns with their roles (x, y, z, error, band) and the symbols as plotted, the panel's meta.json, and every file with its size and sha256.","operationId":"getPanel","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}},{"name":"fig","in":"path","required":true,"description":"Figure id as in the paper's figure list: fig1, fig2, extfig1.","schema":{"type":"string"}},{"name":"panel","in":"path","required":true,"description":"Panel id within the figure: a, b, c, or a compound id such as d-inset.","schema":{"type":"string"}}],"responses":{"200":{"description":"The panel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Panel"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/papers/{paperId}/figures/{fig}/panels/{panel}/data.csv":{"get":{"tags":["files"],"summary":"The panel's plotted values as CSV","description":"The values as plotted, in the panel's own layout, which varies: most panels are wide tables, one row per x value and one column per series (a trace matrix can have thousands of columns); heatmaps and surfaces are long tables, one row per grid point; series panels name which columns belong to which series. The panel record (`columns`, with each column's role) and meta.json (`data_format`, `series`) say which layout a file uses. The file begins with `#` comment lines naming the paper, panel, source, DOI, licences, package version and provenance route; readers that honour a comment character skip them (pandas `read_csv(url, comment=\"#\")`, R `read.csv(url, comment.char=\"#\")`, numpy `loadtxt`). Column names and roles are in the panel record.","operationId":"getPanelData","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}},{"name":"fig","in":"path","required":true,"description":"Figure id as in the paper's figure list: fig1, fig2, extfig1.","schema":{"type":"string"}},{"name":"panel","in":"path","required":true,"description":"Panel id within the figure: a, b, c, or a compound id such as d-inset.","schema":{"type":"string"}}],"responses":{"200":{"description":"CSV, UTF-8.","content":{"text/csv":{"schema":{"type":"string"}}}},"404":{"description":"No such panel, or the panel has no data file (a schematic)."}}}},"/api/v1/papers/{paperId}/figures/{fig}/panels/{panel}/files/{file}":{"get":{"tags":["files"],"summary":"Any other file of the panel","description":"overlay.csv (a fit or model drawn over the data), meta.json (column roles, axis symbols, ranges, series), panel.svg (a schematic). CSV and JSON files carry the same provenance header as data.csv (in JSON, under the `_libcorpus` key).","operationId":"getPanelFile","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}},{"name":"fig","in":"path","required":true,"description":"Figure id as in the paper's figure list: fig1, fig2, extfig1.","schema":{"type":"string"}},{"name":"panel","in":"path","required":true,"description":"Panel id within the figure: a, b, c, or a compound id such as d-inset.","schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"},"description":"File name as listed in the panel record's `files`."}],"responses":{"200":{"description":"The file, with its own content type.","content":{"text/csv":{},"application/json":{},"image/svg+xml":{}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/v1/search":{"get":{"tags":["search"],"summary":"Search papers and panel descriptions","description":"Ranks like the site's search box: an identifier (LCP id, DOI, arXiv id, with or without prefix or link) first, then title, authors, abstract, then panel descriptions. Matching panels are listed on each result.","operationId":"search","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Words, or an identifier."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Ranked results.","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}}}}}},"400":{"description":"q missing."}}}},"/api/v1/papers/{paperId}/citation.bib":{"get":{"tags":["citations"],"summary":"BibTeX entry for the paper","operationId":"getBibtex","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}}],"responses":{"200":{"description":"One @article or @misc entry.","content":{"application/x-bibtex":{"schema":{"type":"string"}}}},"404":{"description":"Not found."}}}},"/api/v1/papers/{paperId}/citation.json":{"get":{"tags":["citations"],"summary":"CSL-JSON record for the paper","operationId":"getCsl","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}}],"responses":{"200":{"description":"A CSL-JSON item (Zotero, citeproc).","content":{"application/vnd.citationstyles.csl+json":{"schema":{"type":"object"}}}},"404":{"description":"Not found."}}}},"/llms.txt":{"get":{"tags":["text"],"summary":"Guide for language models","description":"What LibCorpus is, how to read a paper and fetch a panel, and the list of papers with links to their Markdown digests. /llms-full.txt holds every paper's digest in one file.","operationId":"llmsTxt","responses":{"200":{"description":"Plain text.","content":{"text/plain":{}}}}}},"/paper/{paperId}.md":{"get":{"tags":["text"],"summary":"One paper as Markdown","description":"Metadata, abstract and every figure and panel with its description, columns and file URLs. The HTML address /paper/{paperId} answers the same when asked with `Accept: text/markdown`. A panel has its own digest at /paper/{paperId}/fig/{fig}/panel/{panel}.md.","operationId":"paperMarkdown","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}}],"responses":{"200":{"description":"Markdown.","content":{"text/markdown":{}}},"404":{"description":"Not found."}}}},"/doi/{doi}":{"get":{"tags":["papers"],"summary":"Resolve a DOI to its paper page","description":"Redirects (302) to /paper/{paperId}. /arxiv/{arxivId} does the same for an arXiv identifier, with or without a version suffix.","operationId":"resolveDoi","parameters":[{"name":"doi","in":"path","required":true,"schema":{"type":"string"},"description":"The bare DOI, for example 10.1038/s41534-026-01329-5."}],"responses":{"302":{"description":"Redirect to the paper page."},"404":{"description":"No paper with this DOI (the site's not-found page)."}}}},"/api/paper/{paperId}/pdf":{"get":{"tags":["papers"],"summary":"The paper's PDF","description":"The package's own copy when the licence allows redistribution, otherwise the arXiv PDF served through the site.","operationId":"getPdf","parameters":[{"name":"paperId","in":"path","required":true,"description":"LibCorpus paper id, for example LCP000001.","schema":{"type":"string","pattern":"^LCP\\d{6}$"}}],"responses":{"200":{"description":"PDF.","content":{"application/pdf":{}}},"404":{"description":"No PDF available."}}}},"/mcp":{"post":{"tags":["text"],"summary":"MCP server (Model Context Protocol, Streamable HTTP)","description":"LibCorpus as a tool for AI assistants. Stateless JSON-RPC over POST, no authentication; GET and DELETE answer 405. Tools: search_papers, list_papers, get_paper (JSON or Markdown; one figure with `figure`), get_panel, get_panel_data (CSV text, whole rows up to `max_rows`; chosen columns with `columns`), cite (text, BibTeX, CSL-JSON). Every answer is held under about 40,000 characters so it fits an assistant's context; a shortened answer says what it left out and gives the address of the whole file or record. Add the address as a remote MCP server in Claude, ChatGPT, Cursor or any MCP client.","operationId":"mcp","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A JSON-RPC 2.0 request (initialize, tools/list, tools/call)."}}}},"responses":{"200":{"description":"The JSON-RPC response.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/health":{"get":{"tags":["papers"],"summary":"What this instance serves","operationId":"health","responses":{"200":{"description":"Status, data branch and commit, paper count.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"responses":{"NotFound":{"description":"Not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"schemas":{"LicenseRef":{"type":["object","null"],"properties":{"name":{"type":"string","examples":["CC BY 4.0"]},"url":{"type":["string","null"],"format":"uri"}}},"PaperSummary":{"type":"object","properties":{"id":{"type":"string","examples":["LCP000001"]},"title":{"type":["string","null"]},"authors":{"type":"array","items":{"type":"string"}},"year":{"type":["integer","null"]},"venue":{"type":["string","null"],"description":"Journal abbreviation, or arXiv."},"doi":{"type":["string","null"]},"arxiv_id":{"type":["string","null"]},"license":{"type":["string","null"]},"figure_count":{"type":["integer","null"],"description":"Figures with at least one data-backed panel."},"panel_count":{"type":["integer","null"],"description":"Data-backed panels."},"data_points":{"type":["integer","null"],"description":"Values across the paper's CSVs."},"date_added":{"type":["string","null"],"format":"date"},"links":{"type":"object","description":"Absolute URLs of related resources.","properties":{"self":{"type":"string","format":"uri"},"html":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"},"pdf":{"type":"string","format":"uri"},"bibtex":{"type":"string","format":"uri"},"csl_json":{"type":"string","format":"uri"}}}}},"Paper":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"authors":{"type":"array","items":{"type":"string"}},"abstract":{"type":["string","null"]},"year":{"type":["integer","null"]},"primary_source":{"type":["string","null"],"enum":["journal","arxiv",null],"description":"Which source the stored data was taken from."},"doi":{"type":["string","null"]},"arxiv_id":{"type":["string","null"]},"sources":{"type":"object","description":"The paper's journal and arXiv records as stored (doi, journal, volume, pages, url; arxiv_id, version, url)."},"license":{"type":"object","properties":{"paper":{"$ref":"#/components/schemas/LicenseRef"},"data":{"$ref":"#/components/schemas/LicenseRef"},"data_differs_from_paper":{"type":"boolean","description":"True when the data deposit carries a licence different from the article's."}}},"data_package_version":{"type":["integer","null"],"description":"Bumped when the package is re-released; printed in every CSV header."},"data_points":{"type":["integer","null"]},"citation":{"type":"object","properties":{"text":{"type":"string"},"bibtex":{"type":"string","format":"uri"},"csl_json":{"type":"string","format":"uri"}}},"figure_count":{"type":"integer"},"panel_count":{"type":"integer"},"figures":{"type":"array","items":{"$ref":"#/components/schemas/Figure"}},"links":{"type":"object","description":"Absolute URLs of related resources.","properties":{"self":{"type":"string","format":"uri"},"html":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"},"pdf":{"type":"string","format":"uri"},"bibtex":{"type":"string","format":"uri"},"csl_json":{"type":"string","format":"uri"}}}}},"Figure":{"type":"object","properties":{"id":{"type":"string","examples":["fig2"]},"label":{"type":"string","examples":["Fig. 2"]},"status":{"type":"string","description":"data when panels are present; otherwise no_data, data_unavailable, data_ambiguous or pending (the figure is in the PDF only)."},"panels":{"type":"array","items":{"$ref":"#/components/schemas/PanelSummary"}}}},"PanelSummary":{"type":"object","properties":{"id":{"type":"string","examples":["a"]},"type":{"type":["string","null"],"description":"plot or schematic."},"plot_type":{"type":["string","null"],"examples":["series_1d","heatmap_2d","layered_2d"]},"representation":{"type":"string","description":"data (CSV-backed), image (SVG with a description) or structured."},"description":{"type":["string","null"],"description":"One-line summary of what the panel shows, written for humans and machines."},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileRef"}},"links":{"type":"object","description":"Absolute URLs of related resources.","properties":{"self":{"type":"string","format":"uri"},"html":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"},"data_csv":{"type":"string","format":"uri"}}}}},"FileRef":{"type":"object","properties":{"name":{"type":"string","examples":["data.csv","overlay.csv","meta.json"]},"kind":{"type":"string","examples":["data","overlay","meta","image"]},"label":{"type":["string","null"],"description":"What a secondary file holds, in the paper's words where its meta layer is named (panel record only).","examples":["analytical sol."]},"url":{"type":"string","format":"uri"},"bytes":{"type":["integer","null"],"description":"Size of the file as served, before the provenance header (panel record only)."},"sha256":{"type":["string","null"],"description":"Hash of the file as served, before the provenance header (panel record only). Identical to the data repository's copy for data files."}}},"Column":{"type":"object","properties":{"name":{"type":"string","description":"CSV column name."},"role":{"type":["string","null"],"examples":["x","y","z","error","band lower","band upper"]},"symbol":{"type":["string","null"],"description":"The quantity as plotted, LaTeX where the paper uses it."},"file":{"type":"string","description":"Which file the column is in."}}},"Panel":{"type":"object","properties":{"paper":{"type":"object","description":"The paper: id, title, authors, year, doi, arxiv_id, data_package_version, links."},"figure":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}}},"panel":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":["string","null"]},"plot_type":{"type":["string","null"]},"representation":{"type":"string"},"description":{"type":["string","null"]},"provenance":{"type":["string","null"],"description":"How the data was obtained: the deposit or author route, and what was reconstructed."}}},"columns":{"type":"array","items":{"$ref":"#/components/schemas/Column"}},"meta":{"type":["object","null"],"description":"The panel's meta.json as stored (libcorpus.plotmeta): plot type, ranges, series, colormaps."},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileRef"}},"license":{"type":"object","properties":{"paper":{"$ref":"#/components/schemas/LicenseRef"},"data":{"$ref":"#/components/schemas/LicenseRef"},"data_differs_from_paper":{"type":"boolean","description":"True when the data deposit carries a licence different from the article's."}}},"citation":{"type":"object","properties":{"text":{"type":"string"}}},"links":{"type":"object","description":"Absolute URLs of related resources.","properties":{"self":{"type":"string","format":"uri"},"html":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"},"data_csv":{"type":"string","format":"uri"}}}}},"SearchResult":{"allOf":[{"$ref":"#/components/schemas/PaperSummary"},{"type":"object","properties":{"match":{"type":"string","enum":["identifier","title","authors","abstract","panel_description"]},"matching_panels":{"type":"array","items":{"type":"object","properties":{"figure":{"type":"string"},"label":{"type":"string"},"panel":{"type":"string"},"description":{"type":"string"},"links":{"type":"object","description":"Absolute URLs of related resources.","properties":{"self":{"type":"string","format":"uri"},"html":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"},"data_csv":{"type":"string","format":"uri"}}}}}}}}]}}}}