---
title: "crates.io API: Search crates | Perceptlayer"
description: "Rust crates on crates.io matching a query, with downloads, latest version and links."
url: https://perceptlayer.com/apis/crates-io/search
---

[APIs](https://perceptlayer.com/apis) / [crates.io](https://perceptlayer.com/apis/crates-io) / Search crates

# crates.io: Search crates

Rust crates on crates.io matching a query, with downloads, latest version and links.

GET `/v1/crates-io/search`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | Required | Up to 200 characters Words to match in the crate name, description or keywords. |
| `sort` | string | Optional | relevance, downloads, recent-downloads, recent-updates, new, alpha Sort order. Default relevance. |
| `page` | integer | Optional | Any Results page, from 1. |
| `per_page` | integer | Optional | Any Results per page, 1 to 100. Default 20. |

## Example request

crates.io

GET /v1/crates-io/search?query=serde&per\_page=10 

```
{
  "success": true,
  "data": {
    "total": 26924,
    "page": 1,
    "has_more": true,
    "count": 10,
    "items": [
      {
        "name": "serde",
        "description": "A generic serialization/deserialization framework",
        "latest_version": "1.0.229",
        "downloads": 1817058559,
        "recent_downloads": 473498822,
        "created_at": "2014-12-05T20:20:39.487502Z",
        "updated_at": "2026-07-18T23:05:13.266456Z",
        "repository": "https://github.com/serde-rs/serde",
        "homepage": "https://serde.rs",
        "documentation": "https://docs.rs/serde",
        "url": "https://crates.io/crates/serde"
      },
      {
        "name": "serde-saphyr",
        "description": "YAML (de)serializer for Serde, emphasizing panic-free parsing, fast builds and good error reporting. Supports properties, include, tag and comment capture",
        "latest_version": "2.2.0",
        "downloads": 24968458,
        "recent_downloads": 19277102,
        "created_at": "2025-09-27T20:32:53.691021Z",
        "updated_at": "2026-11-18T17:29:51.155259Z",
        "repository": "https://github.com/bourumir-wyngs/serde-saphyr",
        "documentation": "https://docs.rs/serde-saphyr/latest/serde-saphyr/",
        "url": "https://crates.io/crates/serde-saphyr"
      },
      {
        "name": "clickhouse",
        "description": "Official Rust client for ClickHouse DB",
        "latest_version": "0.15.3",
        "downloads": 18479195,
        "recent_downloads": 6388959,
        "created_at": "2017-05-17T22:21:47.894469Z",
        "updated_at": "2026-10-13T08:26:54.451769Z",
        "repository": "https://github.com/ClickHouse/clickhouse-rs",
        "homepage": "https://clickhouse.com",
        "url": "https://crates.io/crates/clickhouse"
      }
    ]
  },
  "meta": {
    "request_id": "req_0e5468a6abb64ad1bd3920ec78ed7e68",
    "credits_charged": 1,
    "credits_remaining": 1997
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/crates-io?try=search#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

Each item in `data.items` has these 11 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `name` | string |
| `description` | string |
| `latest_version` | string |
| `downloads` | integer |
| `recent_downloads` | integer |
| `created_at` | string |
| `updated_at` | string |
| `repository` | url |
| `homepage` | url |
| `documentation` | url |
| `url` | url |
