# Civitai Models Scraper (`b2b_lead_generation/civitai-models-scraper`) Actor

Extract Civitai AI image models, ratings, download counts, and images into clean CSV, JSON, or Excel datasets without needing logins or proxies. Search checkpoints or LoRAs by keyword, lookup model IDs, and export structured results easily for your research and workflow.

- **URL**: https://apify.com/b2b_lead_generation/civitai-models-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **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

### Civitai Models Scraper: AI image models search, downloads, and ratings

<p align="center">
  <img src="https://imgur.com/f88EcOy.png" alt="Civitai Models" style="max-width:100%; border-radius:14px; width:680px;" />
</p>

This Civitai models scraper helps you quickly explore AI image models, download counts, and ratings. Every run creates a clean dataset ready to export in JSON, CSV, or Excel formats.

Search for models, look up specific items by ID, browse recent image feeds, or grab full tag collections. Exported rows capture essential details like creators, commercial usage rights, latest version names, base models, and model page links.

### Use cases

- **Model research**: Look up checkpoints, LoRAs, and styles while keeping download numbers right next to user ratings.
- **Version tracking**: Pass model IDs to keep track of new version releases, base architecture, and update trends.
- **Image inspiration**: Pull up fresh community creations or look up sample images linked to a specific model.
- **Tag analysis**: Extract tag lists to see how creators categorize their work across different styles.
- **Scheduled runs**: Set up recurring runs to automatically collect updated statistics over time.

### What data does this actor extract?

Model listings record model IDs, titles, categories, content flags, creator usernames, tags, download totals, thumbs-up ratings, commercial permissions, latest version names, base model versions, and page links. Image feeds collect image URLs, dimensions, and timestamps. Tag runs output tag labels and link paths.

Field naming includes convenient camelCase and snake_case aliases (like `modelType` and `model_type`), making the data easy to work with in spreadsheets or custom data pipelines.

Please give credit to Civitai when sharing or republishing extracted datasets.

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | string | `search_models` | Search models, look up model IDs, pull image feeds, or list tags. |
| `query` | string | `anime` | Search term for model searches and tag filtering. |
| `modelIds` | array | `4201` | List of model IDs for direct lookup or image filtering. |
| `types` | array | empty | Model types to filter search results, such as `Checkpoint` or `LORA`. |
| `sort` | string | `Highest Rated` | Order by `Highest Rated`, `Most Downloaded`, or `Newest`. |
| `period` | string | `AllTime` | Time window: `AllTime`, `Year`, `Month`, `Week`, or `Day`. |
| `includeNsfw` | boolean | `false` | Enable to include adult/NSFW flagged content in results. |
| `maxItems` | integer | `100` | Maximum rows to collect in one run (up to 1000). |
| `requestDelaySecs` | number | `1` | Pause between calls in seconds. |
| `userAgent` | string | BigiByte research UA | Custom browser header identifier. |
| `timeoutSecs` | integer | `300` | Maximum run execution time in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout per network request. |
| `proxyConfiguration` | object | No proxy | Custom proxy settings if needed. |

#### Example input

```json
{
    "mode": "search_models",
    "query": "anime",
    "modelIds": ["4201"],
    "types": ["LORA"],
    "sort": "Highest Rated",
    "period": "AllTime",
    "includeNsfw": false,
    "maxItems": 100,
    "requestDelaySecs": 1,
    "userAgent": "B2BLeadGenerationResearch/1.0 (contact: research@b2bleadgeneration.com)",
    "timeoutSecs": 300,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": { "useApifyProxy": false }
}

```

### Output

```json
{
    "id": 16014,
    "name": "Anime Lineart / Manga-like (线稿) Style",
    "modelType": "LORA",
    "model_type": "LORA",
    "nsfw": false,
    "creator_username": "CyberAIchemist",
    "creatorUsername": "CyberAIchemist",
    "tags": ["lineart", "art style"],
    "downloadCount": 207410,
    "thumbsUpCount": 21429,
    "allowCommercialUse": [],
    "commercialUse": [],
    "latestVersion_name": "v3.0 manga-like",
    "latestVersionName": "v3.0 manga-like",
    "latestVersion_baseModel": "SD 1.5",
    "baseModel": "SD 1.5",
    "downloadUrl": "[https://civitai.com/api/download/models/28907](https://civitai.com/api/download/models/28907)",
    "url": "[https://civitai.com/models/16014](https://civitai.com/models/16014)",
    "scraped_at": "2026-10-12T00:00:00+00:00",
    "scrapedAt": "2026-10-12T00:00:00+00:00"
}

```

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer | Unique model or image identifier. |
| `name` | string | Model title or tag label. |
| `modelType` | string | Model category (e.g., Checkpoint, LORA). |
| `nsfw` | boolean | Content safety flag. |
| `creator_username` | string | Profile name of the creator. |
| `tags` | array | Tags assigned to the model. |
| `downloadCount` | integer | Total downloads recorded on the listing. |
| `thumbsUpCount` | integer | Positive ratings count. |
| `allowCommercialUse` | array | Permissions for commercial use. |
| `latestVersion_name` | string | Name of the most recent version update. |
| `latestVersion_baseModel` | string | Base architecture (such as SD 1.5 or SDXL). |
| `downloadUrl` | string | Direct link to the model file download page. |
| `url` | string | Link to the main listing on Civitai. |
| `scraped_at` | string | Timestamp when the item was saved. |
| `imageUrl` | string | Direct link to the image on sample rows. |

### How it works

1. Reads your configuration parameters and prepares the extraction tasks.
2. Formats requests based on chosen search terms, model categories, and filters.
3. Automatically throttles requests using your specified delay (default is 1 second) to maintain smooth operations.
4. Handles temporary network glitches or busy server responses with retry delays.
5. Pages through results until your dataset reaches `maxItems` or ends cleanly.
6. Eliminates duplicate listings automatically and saves output in batches.

### Limits and guidelines

Request speeds default to one call per second to keep runs smooth and reliable.

The scraper focuses strictly on metadata, ratings, and image links. It does not download actual model weight files. Always ensure you follow Civitai's content terms and credit creators when sharing findings.

### Pricing

This actor does not include any hidden software surcharges. Standard Apify compute usage and data storage costs apply. `maxItems` defaults to 100 rows per run and supports up to 1000 rows.

### FAQ

**Does it download the actual AI model files?**

No, weight files can be several gigabytes each. The actor extracts the metadata and direct download URLs so you can review options before downloading manually.

**What happens if a model ID isn't found?**

If a specific model ID returns an error or no longer exists, the scraper logs the issue into an error row and keeps processing the rest of your list.

**How many rows can I export per run?**

By default, runs collect up to 100 items. You can set `maxItems` higher depending on your needs, up to a maximum limit of 1000 items per run.

***

#### Trademark Notice

Civitai and associated brand names, logos, and trademarks belong to their respective owners. They are referenced here purely for identification purposes and do not imply any sponsorship or partnership.

#### Disclaimer

This tool is an independent scraper built to help users organize publicly accessible data. Users remain responsible for complying with site terms, rate limits, and licensing restrictions when collecting or republishing content.

#### Is web scraping legal?

This actor only collects publicly available data without circumventing paywalls or restricted areas. Scraping public content is widely practiced, but how you handle the data matters:

- **Personal data:** When collecting profile usernames or creator details, comply with relevant data protection guidelines such as GDPR or CCPA.
- **Copyright:** Respect creator rights. Avoid rehosting copyrighted model images or text descriptions without proper permission or attribution.
- **Terms of use:** Play fair by keeping request delays reasonable and honoring creator usage licenses.

To learn more, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

# Actor input Schema

## `mode` (type: `string`):

Which public Civitai feed to read: model search, one model by ID, the images feed, or the tags list.

## `query` (type: `string`):

Search text sent as query on model search and on the tags list. Leave blank to omit the query parameter.

## `modelIds` (type: `array`):

Numeric Civitai model IDs, one per line. Required for model details. On the images feed, each ID is sent as modelId. Ignored for search and tags.

## `types` (type: `array`):

Model types for search, one per line. Each value is sent as a types parameter. Example values: Checkpoint, LORA, TextualInversion. Leave empty to skip the filter.

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

Sort order for model search. Verified values are Highest Rated, Most Downloaded, and Newest.

## `period` (type: `string`):

Time window for model search. Verified values are AllTime, Year, Month, Week, and Day.

## `includeNsfw` (type: `boolean`):

When checked, model search sends nsfw=true. When unchecked, model search sends nsfw=false. Default is off.

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

Maximum data rows to save this run. Error rows do not count toward the cap. Hard maximum is 1000.

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

Seconds to wait after each completed request before the next one. Default is 1 second because Civitai does not publish a rate limit.

## `userAgent` (type: `string`):

User-Agent header sent on every request. Include an app name and a contact address so the source can identify the client.

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

Maximum seconds for the whole run. The actor stops and flushes rows already collected when this elapses.

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

Maximum seconds to wait for a single HTTP response before retrying or recording an error row.

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

Optional proxy for Civitai requests. Leave useApifyProxy off to call the API directly. Turn it on only if your IP is blocked.

## Actor input object example

```json
{
  "mode": "search_models",
  "query": "anime",
  "modelIds": [
    "4201"
  ],
  "types": [
    "LORA"
  ],
  "sort": "Highest Rated",
  "period": "AllTime",
  "includeNsfw": false,
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "BigiByteActorResearch/1.0 (contact: research@bigibyte.com)",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Model id, name, model type, NSFW flag, creator, tags, downloads, thumbs-up count, and source URL.

## `images` (type: `string`):

Image id, file URL, size, NSFW flag, created time, and source URL.

## `tags` (type: `string`):

Tag name, tag link, and source URL.

## `errors` (type: `string`):

Failed requests with URL, HTTP status, and message.

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

Every row from the run, without a table view applied.

# 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 = {
    "query": "anime",
    "modelIds": [
        "4201"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/civitai-models-scraper").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 = {
    "query": "anime",
    "modelIds": ["4201"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/civitai-models-scraper").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 '{
  "query": "anime",
  "modelIds": [
    "4201"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call b2b_lead_generation/civitai-models-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/civitai-models-scraper"
        }
    }
}
```

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/ts9HzsJrUr8nPNwwb/builds/jRl3fMZ5qr069CQWS/openapi.json
