# 2s.io Crates.io Search

> 2s.io Crates.io Search is a paid API for AI agents from 2s.io, paid per call via x402, $0.0036/call, status unknown (last checked 2026-09-16).

Search crates.io for Rust packages and return name, version, description, download stats, and repository links

## Facts

- Endpoint: GET https://2s.io/api/dev/crates-search
- Price: $0.0036/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-crates-io-search-9cf3c5aa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lBxfKbbXG1qJ23mBCPlF4

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 2s-io-crates-io-search-9cf3c5aa
```

Example prompt: Search crates.io for async Rust HTTP client libraries and show me the top 5 results with their latest versions, download counts, and repo links.

## When to prefer this

Use this endpoint when an AI agent needs to discover, vet, or compare Rust crates from crates.io without requiring any API key. Ideal for automated dependency research, code generation assistants choosing libraries, or developer agents auditing Rust project dependencies.

## Known failure modes

- Empty query string returns validation error (minLength:1 not met)
- Query exceeding 200 characters returns validation error
- Limit exceeding 30 returns validation error
- No matching crates returns empty result list
- crates.io upstream unavailable causes service error
- Payment failure (x402) blocks request

## How this service works

Search crates.io for Rust packages (keyless). Each result: name, latest stable version, description, total + recent downloads, and repository/homepage/documentation links. For agents discovering or vetting Rust dependencies.

## Output

A list of matching Rust crates (up to the specified limit), each including: crate name, latest stable version, short description, total and recent download counts, and links to the repository, homepage, and documentation.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "minLength": 1,
       "description": "Crate search text, e.g. \"tokio async\"."
      },
      "limit": {
       "type": "integer",
       "maximum": 30,
       "minimum": 1
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-crates-io-search-9cf3c5aa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
