GraphQL APIOne endpoint for everything prefix.dev knows about packages and channels, with an interactive explorer and ready-to-run examples.
Every page on prefix.dev is rendered from the same GraphQL API you can call yourself. It lives at a single endpoint, https://prefix.dev/api/graphql, and handles both queries and mutations.
Use it to:
Search and browse packages across every channel
Read package metadata, dependencies, hashes and attestations
Inspect and configure your own channels
Pull download statistics
Create and revoke API keys
Prefer a terminal?
Everything on this page is also available as a CLI. pixi-pfx wraps these queries in commands with table output and a JSON envelope for scripts.
Endpoint and authentication
Send a POST request with a JSON body containing a query field. A GET request to the same URL serves the interactive explorer instead.
Reads against public channels need no credentials. For private channels and for every mutation, pass an API key as a bearer token:
See API and API keys for how to create one. The explorer at the bottom of this page uses the session of the browser you are logged in with, so no token is needed there.
Pagination
Every paginated field (packages, variants, versions, channels, attestations and quarantines) caps limit at 50. Ask for more and you get 50 back without an error, so walk the set with page (0-indexed) and use pages and totalCount to know when to stop.
At the time of writing that returns pages: 72 and totalCount: 3574, so pages 0 through 71 are valid.
Filtering and ordering
List fields take a filters argument whose string fields accept eq, ne, isIn, isNotIn, startsWith, endsWith and contains. Conditions nest with and and or. Ordering is either byField or, for names, bySimilarity, which also exposes a similarityScore on each result.
On channels, namespace filters on the name a channel is published under, while owner filters on the billing owner. The two differ for channels without a billing owner, such as the public mirrors.
Examples
Expand any of these for a query you can paste straight into the explorer. They are the same examples the explorer itself offers under its Examples tab.
Packages
Get one package with its variants
Everything the package page shows: channel, platforms and the newest builds.
Filter variants by platform, version and build
All variant filters combine, and orderBy accepts BUILD_STRING, CREATED_AT or SIZE.
Look up a single variant by filename
Useful for verifying a download: one record, with both hashes and the yank reason.
Resolve a MatchSpec
packageByMatchspec takes the same spec syntax as pixi and conda. channels is required.
List the platforms and versions that exist
A cheap way to answer "is this built for osx-arm64?" without paging through variants.
Read dependencies, run exports and repodata patches
These come back as raw JSON, matching what ends up in repodata.json. The depends and constrains lists live inside rawIndex.
Find yanked or hidden variants
includeHidden: true is needed to see variants that were removed from the index.
Fetch attestations for a variant
Sigstore attestations published alongside a package file.
Channels
Browse and filter channels
The same filter grammar as packages, over the channel list.
Filter packages inside one channel
Scoped to a single channel, so the counts are the channel's own.
Download counts
Download counts per version
aggregateBy names the dimension to collapse, not the one to group by. Passing PLATFORM sums across platforms and returns rows still split by version, date and python.
Monthly download rollups
A separate field with a bucket date, over a range you choose.
Mutations
These write to the live database
Mutations run against production with your own credentials. There is no sandbox, and deleting a channel really deletes it. Change the placeholder names below before running anything.
Make a channel public
Create an API key
The key value is only shown once, on creation, so store it right away.
Delete an API key
Explorer
The explorer below is the real API. Its sidebar has three tabs: Docs to browse the schema, Examples to load any query from this page into the editor, and History for what you ran before. Press the play button or Ctrl-Enter to run.