Skip to main content

discogs-api-reference

Build a local Markdown copy of the Discogs API reference, one file per section, for the tools and coding agents that cannot read the website.

Discogs publishes its API reference only as a web page, and Cloudflare blocks scripts and agents on every discogs.com page. This tool downloads that one page, converts it to Markdown, and reports what changed since your last copy.

Installation

The tool needs Python 3.11 or later. Install it from PyPI with uv:

uv tool install discogs-api-reference

Or run it without installing it:

uvx discogs-api-reference

Usage

discogs-api-reference [OPTIONS]
Option Effect
(none) Report which files would change; write nothing
--write Create or update the copy
--check Exit with status 1 when the copy is out of date
--diff Also print a unified diff for each change
--output-dir DIR Where the copy lives (default: reference/discogs_api)
--from-html PATH Convert a page saved from a browser instead of downloading it

Errors exit with status 2 and write nothing.

In a project, git-ignore the copy and add a recipe, for example in a justfile:

# Compare reference/discogs_api/ with the Discogs API reference (--diff, --check, --write)
[positional-arguments]
update-api-docs *args:
    uvx discogs-api-reference "$@"

Output

  • One Markdown file per section of the reference, named after its title, such as Database.md or User Collection.md.
  • Every heading and endpoint keeps the website's ID as an <a id="…"> anchor, and links between sections are relative links to those anchors.
  • Each endpoint starts with its name as a level-4 heading, then the HTTP method, then its route alone on a line between backticks, such as `/releases/{release_id}`. Its parameters, requests and responses follow as list items: - **Parameters**, - **Request** and - **Response `200`**. Examples are fenced code blocks, with json for JSON bodies.
  • --write also creates a .discogs-api-reference file in the directory. The tool deletes a page that the reference no longer has only from a directory with that file, so it never deletes Markdown it did not write.

Use of Discogs Content

The reference belongs to Discogs. The copy is for your own local use, such as building tools that call the API as its terms allow. Do not commit, publish or share it: the Discogs Terms of Service forbid providing cached copies of their content to others.

The tool sends one request to https://www.discogs.com/developers per run, and tries again with another browser profile, up to three requests in all, only when Cloudflare rejects one. It accepts no other address. Its User-Agent header names the tool and links to this repository. Cloudflare rejects connections that do not look like a browser's, so the tool uses curl_cffi to open the connection the way a browser does.

When the download fails, open the page in a browser, save it as HTML, and pass the file with --from-html.

Development

See CONTRIBUTING.md. In short, with uv and just installed:

just setup  # Install dependencies and git hooks
just qa     # Run all checks
just test   # Run the tests

License

Apache License 2.0

Metadata

Release files for discogs-api-reference 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discogs-api-reference 0.1.0
File Size Uploaded Provenance Actions
discogs_api_reference-0.1.0.tar.gz 14.2 kB With provenance Details for discogs_api_reference-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for discogs-api-reference 0.1.0
File Interpreter ABI Platform Actions
discogs_api_reference-0.1.0-py3-none-any.whl Python 3 none any Details for discogs_api_reference-0.1.0-py3-none-any.whl

Total release size: 29.5 kB

Release files / discogs_api_reference-0.1.0.tar.gz

Download URL discogs_api_reference-0.1.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f601a0c8907259d10aa63d3c966461eda2d015286550e50d052d83d68ef55d7
BLAKE2b-256 checksum
How to use checksums
d01c49515734efb8f2112e4c596999cffb3189f3901aeeee30d7a63d14f77d6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / discogs_api_reference-0.1.0-py3-none-any.whl

Download URL discogs_api_reference-0.1.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c405ccdbe18fccb3e60b3acca5146ea0d977b330b2aef9b92a9147998b8178f
BLAKE2b-256 checksum
How to use checksums
a488d9df1004c1399d74ec7a226af4bb3ec2dac96606d63f7531d71c46bc85c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for discogs-api-reference 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for discogs_api_reference-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page