Hex.pm API
Free Hex.pm API with no key: Elixir and Erlang package metadata, releases, download counts, dependencies and documentation links. Tested curl example.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the Hex.pm API?
The Hex.pm API is the free, key-free registry API for Elixir and Erlang packages, providing package metadata, every release, download statistics, dependencies and documentation links.
Hex is the package manager for the BEAM ecosystem, serving both Elixir and Erlang. Its API exposes package metadata, the full release history and download counts split by period.
The download breakdown into `all`, `recent` and `week` is more useful than a single total: a package with high all-time but low recent downloads is likely being abandoned, which a cumulative figure would hide entirely.
Quick facts
- Base URL
https://hex.pm/api- Authentication
- No API key for public package reads. Publishing requires an auth key.
- Rate limit
- 100 requests per minute per IP for anonymous access.
- Pricing
- Free.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Hex.pm API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. Fetch an Elixir package
GET https://hex.pm/api/packages/phoenix
curl 'https://hex.pm/api/packages/phoenix'const res = await fetch("https://hex.pm/api/packages/phoenix");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://hex.pm/api/packages/phoenix", timeout=20)
res.raise_for_status()
print(res.json()){
"meta": {
"links": {
"Changelog": "https://phoenix.hexdocs.pm/changelog.html",
"GitHub": "https://github.com/phoenixframework/phoenix"
},
"description": "Peace of mind from prototype to production",
"licenses": [
"MIT"
],
"maintainers": []
},
"name": "phoenix",
"url": "https://hex.pm/api/packages/phoenix",
"owners": [
{
"url": "https://hex.pm/api/users/chrismccord",
"username": "chrismccord",
"email": "chris@chrismccord.com"
},
{
"url": "https://hex.pm/api/users/gazler",
"username": "gazler",
"email": "gazler@gmail.com"
},
{
"url": "https://hex.pm/api/users/jeregrine",
"username": "jeregrine",
"email": "stiebs.81@gmail.com"
},
{
"url": "https://hex.pm/api/users/josevalim",
"username": "josevalim",
"email": "jose.valim@gmail.com"
},
{
"url": "https://hex.pm/api/users/steffend",
"username": "steffend"
}
],
"inserted_at": "2014-04-21T22:38:32.000000Z",
"updated_at": "2026-08-18T09:57:44.311616Z",
"repository": "hexpm",
"releases": [
{
"version": "1.8.11",
"url": "https://hex.pm/api/packages/phoenix/releases/1.8.11",
"has_docs": true,
"inserted_at": "2026-08-12T07:56:12.292729Z"
},
{
"version": "1.8.10",
"url": "https://hex.pm/api/packages/phoenix/releases/1.8.10",
"has_docs": true,
"inserted_at": "2026-08-10T16:26:27.166240Z"
},
{
"version": "1.8.9",
"url": "https://hex.pm/api/packages/phoenix/releases/1.8.9",Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
packages/<name> | path | Required | Package name. phoenix |
packages?search= | string | Optional | Search packages by name or description. http client |
packages/<name>/releases/<version> | path | Optional | A specific release with its dependencies. releases/1.7.0 |
sort | string | Optional | downloads, recent_downloads, inserted_at or updated_at. recent_downloads |
Response fields
namestring- Package name.
meta.descriptionstring- Package description.
meta.licensesarray- Licence identifiers.
meta.linksobject- GitHub, docs and homepage links.
downloadsobject- all, recent and week download counts.
releasesarray- Every published version with its release date.
latest_stable_versionstring- Current stable release.
docs_html_urlstring- HexDocs documentation URL.
What you can build with the Hex.pm API
- Show the current version of an Elixir dependency
- Compare BEAM libraries by recent download activity
- Audit licences across a mix.exs dependency tree
- Link straight to a package's HexDocs from your tooling
Common errors and how to fix them
404
Package name not found.
Fix: Hex package names are lowercase with underscores, matching the Elixir convention.
429
Exceeded 100 requests per minute.
Fix: Throttle and cache; package metadata changes infrequently.
Misleading download totals
`all` is cumulative and favours old packages.
Fix: Compare `recent` downloads to judge whether a package is actively used.
Hex.pm API — frequently asked questions
Is the Hex.pm API free?
Yes, reading public package data requires no API key. Publishing packages requires an auth key.
Does it cover Erlang as well as Elixir?
Yes, Hex is the package manager for the whole BEAM ecosystem, so Erlang packages are included alongside Elixir ones.
Which download figure should I look at?
`recent` rather than `all`. Cumulative totals favour older packages, while recent downloads show whether something is still actively used.
How do I find a package's documentation?
The docs_html_url field links directly to its HexDocs page, which is generated automatically for every published package.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON Validator
Free online JSON validator: validate JSON and find syntax errors with the exact line and column. See root type, key counts and depth — instant and 100% private.
Hex.pm is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.