GraphQLOur GraphQL backend is publicly available. Read here how to use it.

The prefix.dev GraphQL API provides programmatic access to our package registry, channels, and metadata. The API is publicly accessible at /api/graphql and powers the prefix.dev website itself.

Use the GraphQL API to:

  • Search and browse packages across channels
  • Query package metadata, dependencies, and versions
  • Inspect channel information
  • Modify channel information
  • Get API keys

Query packages within a channel

List packages in a specific channel:

{
  channel(name: "conda-forge") {
    name
    description
    packages(limit: 20) {
      pages
      page {
        name
        latestVersion {
          totalCount
        }
        description
      }
    }
  }
}

Get package details

Get detailed information about a specific package including its variants:

{
  package(channelName: "conda-forge", name: "numpy") {
    name
    description
    channel{
      name
      owner
    }
    latestVersion {
      totalCount
    }
    variants(limit: 10) {
      page {
        version
        buildString
        platform
        filename
        size
        md5
        yankedReason
        rawIndex
        rawAbout
      }
    }
  }
}

Query package dependencies

Get dependency information for a specific package variant:

{
  package(channelName: "conda-forge", name: "pandas") {
    variants(limit: 1, platform: "linux-64") {
      page {
        name
        version
        rawIndex # contains the `depends` field
      }
    }
  }
}

Mutation to make a channel public

mutation updateChannel {
  updateChannel(name: "channel_name", isPublic: true){
    isPublic
    name
  }
}

Mutation to create new API key

Get a new API key for the use of your channels. This assumes you've logged in, in another browser window.

mutation makeApiKey {
  createApiKey(name: "new_key", expiresAt: "2025-10-03T00:00:00Z"){
    key
  }
}

A key can only be created once, and thus also fetched only once.

You can delete the key again with:

mutation delApiKey {
  deleteApiKey(name: "new_key")
}

Explorer

You can use the interactive explorer below to test the queries from above! Please note: you are operating on the actual database of the website. If you delete a channel, it is gone! So be careful.

The GraphQL explorer can also be found under https://prefix.dev/api/graphql for a fullscreen experience.