# Hex Package Version Oracle

> Hex Package Version Oracle is a paid API for AI agents from oracles-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns the current latest version, publish date, and URL for a given Elixir/Erlang Hex.pm package, resolved live.

## Facts

- Endpoint: GET https://oracles-production.up.railway.app/v1/hex/status
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hex-package-version-oracle-74687d7e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7D9lfarEfdxWOKMe6Qt6i

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hex-package-version-oracle-74687d7e
```

Example prompt: What is the latest version of the Phoenix Elixir package on Hex.pm, and when was it published?

## When to prefer this

Use this endpoint when you need to programmatically check the latest published version and release date of any Elixir or Erlang package hosted on Hex.pm, especially for dependency auditing, version monitoring, or build automation in Elixir/Erlang ecosystems.

## Known failure modes

- Package name not found on Hex.pm — returns empty or error entity
- Invalid query parameter format — request ignored or returns error
- Hex.pm upstream unavailable — live resolution fails
- Missing both `id` and `package` query parameters — no package to look up

## How this service works

Look up the current published version of any Elixir/Erlang Hex package on Hex.pm (Elixir) — latest version string, release date, and repo/docs URL. Answers "what is the newest version of phoenix, ecto, plug, phoenix_live_view?" for mix.exs pinning. Use ?package=<name> (resolved live).

## Output

Returns structured data about the Hex.pm package including the latest version string, publish date, and a URL to the package page, resolved live from Hex.pm.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "id": {
       "type": "string",
       "description": "entityId to look up; omit to list tracked entities"
      },
      "package": {
       "type": "string",
       "description": "Any Hex.pm (Elixir) package name — resolved and fetched live if not already tracked"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "entity": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hex-package-version-oracle-74687d7e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from oracles-production.up.railway.app](https://www.zero.xyz/host/oracles-production.up.railway.app/llms.txt)
