crates.io · Capability

crates.io Web API — Crates

crates.io Web API — Crates. Self-contained Naftiko capability covering crate search, detail lookup, and publishing.

crates.io Web API — Crates is a Naftiko capability published by crates.io, one of 4 capabilities the APIs.io network indexes for this provider. It bundles 2 operations across the GET method rooted at /v1/api/v1/crates.

The capability includes 2 read-only operations. Lead operation: Search Crates. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Cratesio, Crates, and Rust.

Run with Naftiko CratesioCratesRust

What You Can Do

GET
Searchcrates — Search Crates
/v1/api/v1/crates
GET
Getcrate — Get Crate Details
/v1/api/v1/crates/{crate}

MCP Tools

crates-search

Search Crates

read-only idempotent
crates-get

Get Crate Details

read-only idempotent

Capability Spec

web-api-crates.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: crates.io Web API — Crates
  description: 'crates.io Web API — Crates. Self-contained Naftiko capability covering crate search, detail lookup, and publishing.'
  tags:
  - Cratesio
  - Crates
  - Rust
  created: '2026-05-25'
  modified: '2026-05-25'
binds:
- namespace: env
  keys:
    CRATES_IO_TOKEN: CRATES_IO_TOKEN
capability:
  consumes:
  - type: http
    namespace: crates-crates
    baseUri: https://crates.io
    description: crates.io Crates business capability. Self-contained, no shared references.
    resources:
    - name: api-v1-crates
      path: /api/v1/crates
      operations:
      - name: searchcrates
        method: GET
        description: Search Crates
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: q
          in: query
          type: string
          description: Search query.
        - name: per_page
          in: query
          type: integer
          description: Results per page (1-100).
        - name: page
          in: query
          type: integer
          description: Page number.
        - name: sort
          in: query
          type: string
          description: Sort order.
    - name: api-v1-crates-crate
      path: /api/v1/crates/{crate}
      operations:
      - name: getcrate
        method: GET
        description: Get Crate Details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: crate
          in: path
          type: string
          required: true
    - name: api-v1-crates-new
      path: /api/v1/crates/new
      operations:
      - name: publishcrate
        method: PUT
        description: Publish A New Crate Version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Binary publish envelope.
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.CRATES_IO_TOKEN}}'
      placement: header
  exposes:
  - type: rest
    namespace: crates-crates-rest
    port: 8080
    description: REST adapter for crates.io Web API — Crates.
    resources:
    - path: /v1/api/v1/crates
      name: search-crates
      description: REST surface for crate search.
      operations:
      - method: GET
        name: searchcrates
        description: Search Crates
        call: crates-crates.searchcrates
        with:
          q: rest.query.q
          per_page: rest.query.per_page
          page: rest.query.page
          sort: rest.query.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v1/crates/{crate}
      name: get-crate
      description: REST surface for crate detail.
      operations:
      - method: GET
        name: getcrate
        description: Get Crate Details
        call: crates-crates.getcrate
        with:
          crate: rest.path.crate
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: crates-crates-mcp
    port: 9090
    transport: http
    description: MCP adapter for crates.io Web API — Crates.
    tools:
    - name: crates-search
      description: Search Crates
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: crates-crates.searchcrates
      with:
        q: tools.q
        per_page: tools.per_page
        page: tools.page
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: crates-get
      description: Get Crate Details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: crates-crates.getcrate
      with:
        crate: tools.crate
      outputParameters:
      - type: object
        mapping: $.