# Crates Io Rust Crates Scraper (`real-estate-api/crates-io-rust-crates-scraper-202610120341`) Actor

Crates.io Rust Crates Scraper is a Python tool designed to extract crate metadata, download counts, version histories, dependencies, license types, and repository URLs from Crates.io. It exports structured Rust ecosystem analytics into clean CSV or JSON format

- **URL**: https://apify.com/real-estate-api/crates-io-rust-crates-scraper-202610120341.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### crates.io Rust Crates Scraper — Crate Search, Download Statistics, and Dependencies

### Overview

crates.io Rust Crates Scraper collects publicly available information about Rust crates, including search results, download statistics, version details, crate owners, and reverse dependencies.

The actor organizes collected information into a structured dataset that can be exported as JSON, CSV, or Excel for analysis, package research, and dependency management.

### Features

- **Crate Search:** Find crates using keywords and configurable sorting options.
- **Crate Details:** Collect crate metadata, version information, and download statistics.
- **Owner Information:** Retrieve crate ownership details and maintainer names.
- **Reverse Dependencies:** Explore crates that depend on a specified crate.
- **Pagination:** Collect additional search results and dependency records within the configured item limit.
- **Duplicate Filtering:** Remove duplicate crate, owner, and dependency records while preserving records collected through different modes.
- **Structured Exports:** Organize results for spreadsheet analysis and data processing.

### Use Cases

- **Crate Discovery:** Find Rust packages matching keywords such as `json`.
- **Package Research:** Review crate versions, download counts, and descriptions.
- **Maintainer Research:** Examine ownership information for selected crates.
- **Dependency Analysis:** Review reverse dependencies before planning potentially breaking changes.
- **Registry Monitoring:** Compare collected snapshots to identify changes in versions and download statistics.
- **Dataset Analysis:** Export crate information for reporting and further processing.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | Array | `["json"]` | Keywords used to find crates. |
| `crateNames` | Array | `[]` | Exact crate names for collecting detailed information, owners, and reverse dependencies. |
| `sort` | String | `relevance` | Search ordering: `relevance`, `downloads`, `recent-downloads`, `recent-updates`, or `new`. |
| `maxItems` | Integer | `100` | Maximum number of successful records to collect. Minimum: 1; maximum: 1000. |

### Example Input

```json
{
  "searchQueries": ["json"],
  "crateNames": ["serde"],
  "sort": "relevance",
  "maxItems": 100
}
```

### What Data Does This Actor Extract?

The actor produces records for crate search results, detailed crate information, owners, and reverse dependencies. Available fields vary depending on the collection mode and the information provided by the registry.

#### Extracted Data Fields

| Field | Type | Description |
|---|---|---|
| `id` | String | Identifier for a crate, owner, or dependency record. |
| `name` | String | Crate name or the crate associated with an owner or dependency record. |
| `downloads` | Integer | Total download count when available. |
| `recent_downloads` | Integer | Recent download count when available. |
| `default_version` | String | Default crate version. |
| `newest_version` | String | Newest available version. |
| `max_version` | String | Maximum version reported for the crate. |
| `max_stable_version` | String | Latest stable version when available. |
| `num_versions` | Integer | Number of versions reported for the crate. |
| `crate_summary` | String | Short description of the crate. |
| `keywords` | Array | Keywords associated with the crate. |
| `categories` | Array | Categories assigned to the crate. |
| `created_at` | String | Crate creation timestamp. |
| `updated_at` | String | Last update timestamp. |
| `yanked` | Boolean | Indicates whether the reported version is yanked. |
| `login` | String | Owner login name. |
| `owner_name` | String | Owner display name when available. |
| `req` | String | Version requirement for a reverse dependency. |
| `kind` | String | Owner or dependency classification when available. |
| `mode` | String | Collection mode: `search`, `detail`, `owners`, or `reverse_dependencies`. |
| `scraped_at` | String | Timestamp when the record was collected. |

### Example Output

The following is an illustrative crate search record. Available values depend on the crate and the collected data.

```json
{
  "id": "json",
  "name": "json",
  "created_at": "2016-06-12T10:45:12.398700Z",
  "updated_at": "2020-03-18T08:39:23.818803Z",
  "downloads": 25979912,
  "recent_downloads": 2240990,
  "default_version": "0.12.4",
  "num_versions": 54,
  "yanked": false,
  "max_version": "0.12.4",
  "newest_version": "0.12.4",
  "max_stable_version": "0.12.4",
  "crate_summary": "JSON implementation in Rust",
  "exact_match": true,
  "mode": "search",
  "scraped_at": "2026-10-12T00:00:00+00:00"
}
```

### Collection Modes

- **`search`** — Collects crates matching the configured search queries.
- **`detail`** — Collects detailed information about specified crates.
- **`owners`** — Collects ownership information for specified crates.
- **`reverse_dependencies`** — Collects information about crates that depend on specified crates.

### Working with Your Dataset

After the actor finishes, open its dataset to review the collected records and export them in the supported formats:

- **JSON:** For structured data processing.
- **CSV:** For spreadsheet analysis and reporting.
- **Excel:** For reviewing and comparing crate information.

You can use exported datasets to compare crate statistics across separate runs, review version changes, and analyze dependency relationships.

### Important Notes

- Search queries and exact crate names can be combined in one run.
- The `maxItems` setting applies to successful records and has a maximum value of 1000.
- Duplicate crate, owner, and dependency identifiers are filtered according to the actor's deduplication logic.
- Search and detail records for the same crate may both be retained because they represent different collection modes.
- The available fields depend on the crate and the information returned during collection.

### FAQ

**Can I search for multiple crates?**

Yes. Provide multiple search queries in `searchQueries` and exact crate names in `crateNames`.

**Can I collect owner information?**

Yes. Supply crate names to collect available ownership information.

**Can I investigate reverse dependencies?**

Yes. Provide the names of the crates you want to investigate.

**Can I export the results to a spreadsheet?**

Yes. The collected dataset can be exported as CSV or Excel, as well as JSON.

**Can I collect both search results and detailed crate information in one run?**

Yes. Configure both `searchQueries` and `crateNames` in the same input.

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with crates.io or its maintainers. Users are responsible for ensuring that their collection and use of data comply with applicable laws and relevant terms.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. Scraping is not the same thing as hacking, and there is no single law that bans it. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords sent to the public crates.io search endpoint. One query per line. Each query is paginated until the next page is missing or the item cap is reached.

## `crateNames` (type: `array`):

Exact crate names, such as serde. For each name the actor loads crate detail, owners, and reverse dependencies.

## `sort` (type: `string`):

Search sort: relevance, downloads, recent-downloads, recent-updates, or new. Unknown values fall back to relevance.

## `maxItems` (type: `integer`):

Maximum number of successful records to save in one run. The free cap is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between HTTP calls. The minimum is 1.05 so the run stays at or under one request per second.

## `timeoutSecs` (type: `integer`):

Overall run time limit in seconds. The actor stops scheduling new requests after this elapses.

## `requestTimeoutSecs` (type: `integer`):

Per-request HTTP timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy settings. Leave useApifyProxy false to call crates.io directly. Enable Apify Proxy or supply your own proxy URLs only if you need another IP.

## Actor input object example

```json
{
  "searchQueries": [
    "json"
  ],
  "crateNames": [],
  "sort": "relevance",
  "maxItems": 100,
  "requestDelaySecs": 1.05,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset with one row per crate, owner, reverse dependency, or error.

## `overview` (type: `string`):

Table view of crate id, name, downloads, version, and mode.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "json"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/crates-io-rust-crates-scraper-202610120341").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["json"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/crates-io-rust-crates-scraper-202610120341").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "json"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call real-estate-api/crates-io-rust-crates-scraper-202610120341 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/crates-io-rust-crates-scraper-202610120341"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7InGWIlRNgpzKJhCK/builds/fcFFmtdrjOd0yWMim/openapi.json
