APM Docs

REST API Reference

APM registry API endpoints for packages, search, and skill content

Base URL

https://apm.orthg.nl

All endpoints return JSON unless otherwise noted.

Package naming

All packages use scoped names: @scope/name. API paths use the scoped format directly:

/api/packages/@scope/name

Endpoints

GET /api/packages

List packages with pagination and sorting.

Query parameters:

ParameterTypeDefaultDescription
pageinteger1Page number (min 1)
pageSizeinteger20Results per page (1–100)
sortstring"name"Sort field: "name", "stars", or "indexed"
orderstring"asc"Sort order: "asc" or "desc"

Response:

{
  "data": [
    {
      "scope": "anthropics",
      "name": "code-review",
      "description": "Systematic code review checklist",
      "kind": "skill",
      "sourceRepo": "anthropics/skills",
      "repoOwner": "anthropics",
      "repoStars": 87,
      "license": "MIT",
      "lastIndexedAt": "2026-03-14T00:00:00.000Z"
    }
  ],
  "total": 142,
  "page": 1,
  "pageSize": 20
}

GET /api/packages/@:scope/:name

Get full details for a single package.

Response:

{
  "id": "uuid",
  "scope": "anthropics",
  "name": "code-review",
  "description": "Systematic code review checklist",
  "kind": "skill",
  "sourceRepo": "anthropics/skills",
  "sourcePath": "code-review",
  "sourceRef": "main",
  "repoOwner": "anthropics",
  "repoStars": 87,
  "license": "MIT",
  "skillMdRaw": "---\nname: code-review\n...",
  "frontmatter": { "name": "code-review", "description": "..." },
  "hosted": false,
  "firstIndexedAt": "2026-03-01T00:00:00.000Z",
  "lastIndexedAt": "2026-03-14T00:00:00.000Z",
  "lastCommitSha": "abc123def456..."
}

Errors:

StatusBody
400{ "error": "Invalid package path. Use @scope/name" }
404{ "error": "Package not found" }

GET /api/packages/@:scope/:name/skill-md

Get the raw SKILL.md content for a package.

Response: Plain text SKILL.md content (Content-Type: text/markdown).


GET /api/packages/@:scope/:name/source

Redirects to the source repository on GitHub.

Response: 302 redirect to https://github.com/<sourceRepo>.


GET /api/search?q=...

Full-text search across scopes, package names, and descriptions.

Query parameters:

ParameterTypeRequiredDescription
qstringYesSearch query

Response:

{
  "results": [
    {
      "scope": "anthropics",
      "name": "code-review",
      "description": "Systematic code review checklist",
      "kind": "skill",
      "sourceRepo": "anthropics/skills",
      "repoOwner": "anthropics",
      "repoStars": 87,
      "license": "MIT",
      "lastIndexedAt": "2026-03-14T00:00:00.000Z"
    }
  ],
  "total": 3
}

Returns up to 50 results, ranked by relevance. An empty or missing q parameter returns { "results": [], "total": 0 }.

Search uses PostgreSQL full-text search with English tokenization. Queries are split by whitespace and matched as prefix terms (e.g., "code rev" matches "code-review").


POST /api/packages/@:scope/:name/track

Track a download/install event for a package. Increments the package's download count.

Request: No body required.

Response:

{ "ok": true }

Errors:

StatusBody
404{ "error": "Not found" }

The web UI calls this automatically when a user copies or downloads a SKILL.md file (once per page visit). The CLI should call this on apm install.


POST /api/publish

Publish a package to the hosted registry.

Status: Not yet implemented. Returns 501.


Usage from the CLI

The APM CLI uses this API under the hood:

CLI commandAPI call
apm install @scope/nameGET /api/packages/@scope/name then POST /api/packages/@scope/name/track
apm search <query>GET /api/search?q=<query>
apm info @scope/nameGET /api/packages/@scope/name

You can override the registry URL with --registry or the APM_REGISTRY environment variable.