# Civitai Ai Images Prompts Scraper (`b2b_lead_generation/civitai-ai-images-prompts-scraper`) Actor

Scrape and export public Civitai images, dimensions, usernames, and base models into clean JSON, CSV, or Excel with flexible filtering.

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

## Civitai AI Images and Prompts Scraper

![Civitai AI Images and Prompts Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/civitai-ai-images-prompts-scraper-cover.png)

Collect public AI-generated image metadata from Civitai. Retrieve image URLs, dimensions, content ratings, creation dates, creator usernames, and base models. Filter results by content rating, sorting preference, and time period, then export structured data in JSON, CSV, or Excel.

### What It Does

This actor collects publicly available Civitai image records and saves them as structured Apify dataset items. It supports filtering by NSFW level, sorting images by popularity or recency, and selecting a time period. Duplicate image records are skipped during collection.

### Input Example

```json
{
  "nsfw": "None",
  "sort": "Most Reactions",
  "period": "Week",
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `nsfw` | string | `None` | Content rating filter: None, Soft, Mature, or X. |
| `sort` | string | `Most Reactions` | Sorting preference, such as Most Reactions or Newest. |
| `period` | string | `Week` | Time period: Day, Week, Month, Year, or AllTime. |
| `maxItems` | integer | `100` | Maximum number of successful records to collect. |
| `requestDelayMs` | integer | `1000` | Delay between requests in milliseconds. |
| `userAgent` | string | `ActorResearch/1.0` | User-Agent value used for requests. |
| `timeoutSecs` | integer | `300` | Overall run timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Individual request timeout in seconds. |
| `proxyConfiguration` | object | Proxy off | Optional proxy configuration. |

### Output Example

Each record contains image information, creator details, model information, and collection metadata.

```json
{
  "imageId": 12097475,
  "url": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/936f0e8d-c76f-4aa7-8b5c-37349f9b7da7/original=true/936f0e8d-c76f-4aa7-8b5c-37349f9b7da7.jpeg",
  "width": 1520,
  "height": 1952,
  "imageType": "image",
  "createdAt": "2024-05-10T21:33:39.009Z",
  "username": "Stellaaa",
  "baseModel": "Pony",
  "scrapedAt": "2026-10-12T05:30:00+00:00"
}
```

### Output Fields

| Field | Description |
|---|---|
| `imageId` | Unique image identifier |
| `url` | Image URL |
| `width` | Image width in pixels |
| `height` | Image height in pixels |
| `imageType` | Type of image |
| `createdAt` | Image creation timestamp |
| `username` | Creator's username |
| `baseModel` | Associated base model |
| `scrapedAt` | Record collection timestamp |

### Use Cases

- **Model Research:** Explore popular or recently published Civitai images for AI model research.
- **Creator Discovery:** Collect creator usernames and associated base models.
- **Image Cataloging:** Build structured image metadata collections for research and analysis.
- **Content Filtering:** Use the `nsfw` filter to select the content rating you need.

### Frequently Asked Questions

**Who can use this actor?**

AI researchers, developers, content analysts, and machine learning enthusiasts who need structured metadata about public Civitai images.

**What export formats are supported?**

You can export records as JSON, CSV, Excel, and other formats supported by Apify datasets.

**Can I filter images by content rating?**

Yes. Use the `nsfw` input to select a content rating, such as `None`, `Soft`, `Mature`, or `X`.

**Can I sort images by popularity or recency?**

Yes. Use the `sort` input to choose a sorting preference, such as `Most Reactions` or `Newest`.

**Can I collect images from a specific time period?**

Yes. Set `period` to Day, Week, Month, Year, or AllTime.

**Can I schedule recurring runs?**

Yes. Configure an Apify schedule to refresh your image metadata collection automatically.

### Trademark Notice

Civitai and related names are the property of their respective owners. They are used only to identify the source of the collected information. This actor is an independent tool and is not affiliated with or endorsed by Civitai.

### Is Web Scraping Legal?

This actor collects publicly accessible image metadata without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** Records may contain creator usernames or other information identifying individuals. Handle such information responsibly and follow applicable privacy laws, including GDPR or CCPA where relevant.
- **Copyright and Licensing:** Images and prompts may be protected by copyright or subject to individual usage licences. Obtain appropriate permission and respect attribution requirements before reusing or redistributing creative content.
- **Platform Terms and Rate Limits:** Respect Civitai's terms, usage policies, and request limits.
- **Disclaimer:** This information is provided for general guidance, not legal advice. Consult a qualified legal professional if you have questions about your intended use.

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

# Actor input Schema

## `nsfw` (type: `string`):

Civitai nsfw filter such as None, Soft, Mature, or X.

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

Civitai sort mode such as Most Reactions, Most Comments, Newest.

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

Time window such as Day, Week, Month, Year, or AllTime.

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Milliseconds to wait between requests. Raise if you see 429.

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

User-Agent header sent with each request.

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

Overall run budget in seconds.

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

Per-request timeout in seconds.

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

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "nsfw": "None",
  "sort": "Most Reactions",
  "period": "Week",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows in the overview table.

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

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "nsfw": "None",
    "sort": "Most Reactions",
    "period": "Week"
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/civitai-ai-images-prompts-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 = {
    "nsfw": "None",
    "sort": "Most Reactions",
    "period": "Week",
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/civitai-ai-images-prompts-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 '{
  "nsfw": "None",
  "sort": "Most Reactions",
  "period": "Week"
}' |
apify call b2b_lead_generation/civitai-ai-images-prompts-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-ai-images-prompts-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/vdtfFMPzptetW1MGC/builds/N3fKYvtKyziz7sHxw/openapi.json
