# Using the Nixhub API
Source: https://www.jetify.com/docs/docs/nixhub/index

Version: 2.0.0

The [**Nixhub**](https://www.nixhub.io) API lets you search over 1 million package versions for over
100,000 Nix packages. You can use the Nixhub API to search for packages, resolve historic versions,
and then install them using Devbox or Nix. Nixhub is designed to be simple and easy to use, and is
free to use for personal use.

Nixhub is a RESTful API that uses standard HTTP methods and status codes. Parameters are passed to
the API as query parameters, and the API returns JSON responses. The current version does not make
use of pagination, though this may be added in the future.

The API is available for free for personal use, subject to rate limiting. If you need a higher rate
limit or wish to use Devbox for a commercial project, you can
[**request access to our paid tier**](https://form.typeform.com/to/hueeLe9S).

### Endpoints[​](#endpoints "Direct link to Endpoints")

Nixhub exposes the following endpoints for searching and resolving packages:

* [`v2/search`](/docs/nixhub/search-packages/) - Search for packages by name
* [`v2/pkg`](/docs/nixhub/get-a-package/) - Get details and version history for a specific package
* [`v2/resolve`](/docs/nixhub/resolve-a-package-version/) - Resolve a package name and version to a
  nixpkgs commit and attribute path.

### Rate Limits[​](#rate-limits "Direct link to Rate Limits")

In order to prevent abuse, personal use of the API is subject to rate limits. API Rate limiting
works as follows:

1. A given IP address starts with a pool of 1000 requests
2. Each request decrements the pool by 1
3. The pool is replenished at a rate of 5 requests per minute

If the pool is empty, the API will return a `429 Too Many Requests` status code.

<Check>
  If you have a use case that requires a higher rate limit or would like to use the API for
  commercial purposes, please fill out [**this form**](https://form.typeform.com/to/hueeLe9S) to
  request access.
</Check>

### Nixhub for Enterprise[​](#nixhub-for-enterprise "Direct link to Nixhub for Enterprise")

Nixhub provides an index of publicly available packages from the
[Nixpkgs](https://github.com/nixos/nixpkgs) repository. If you're interested in using Nixhub to
index and install private packages or Flakes for your team, we'd love to chat with you. You can
request a meeting [**with our team**](https://calendly.com/d/cprm-dq6-y9y/nixhub-enterprise-chat)

### Versioning[​](#versioning "Direct link to Versioning")

The API is versioned using a `v2` prefix in the URL. All `v2` endpoints are considered stable and
will not change in a backwards-incompatible way. Breaking changes will be introduced in a new
version of the API, with a new version prefix.

## API Reference[​](#api-reference "Direct link to API Reference")

* [Search Packages](/docs/nixhub/search-packages/) - Search for packages by name
* [Get Package Details](/docs/nixhub/get-a-package/) - Get details and version history for a
  specific package
* [Resolve Package](/docs/nixhub/resolve-a-package-version/) - Resolve the latest available package
  for a given name and version string