{
  "openapi": "3.0.1",
  "info": {
    "title": "Civitai Scraper - AI Models, LoRAs, Images & Creator Leads",
    "description": "Scrape Civitai: AI models (Checkpoints, LoRAs, embeddings) with versions, download URLs, trained words, stats & license; community images with full generation prompts/params; and creator leads with socials, Patreon/Ko-fi & lead score. Filter, monitor new releases. No API key, no browser.",
    "version": "0.1",
    "x-build-id": "4WWdFZfJ5IccuSCmo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~civitai-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-civitai-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapesage~civitai-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-civitai-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapesage~civitai-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-civitai-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "models",
              "images",
              "creators"
            ],
            "type": "string",
            "description": "<b>Models</b> = AI models (Checkpoints, LoRAs, embeddings…) with versions, download URLs, trained words, stats & license (the default). <b>Images</b> = community images with full generation prompts & parameters. <b>Creators</b> = creator leads with socials, Patreon/Ko-fi links & lead score.",
            "default": "models"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword to search. In <b>Models</b> mode it searches model names; in <b>Creators</b> mode it searches usernames. Leave empty to browse by sort/filters."
          },
          "modelIds": {
            "title": "Model IDs or URLs (Models mode)",
            "type": "array",
            "description": "Fetch specific models by id or URL, e.g. <code>4201</code> or <code>https://civitai.com/models/4201</code>.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Civitai URLs: model pages (<code>civitai.com/models/&lt;id&gt;</code>) or user pages (<code>civitai.com/user/&lt;name&gt;</code>). Auto-routed by the selected mode.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "username": {
            "title": "Filter by creator username",
            "type": "string",
            "description": "Only models (or images) from this Civitai creator, e.g. <code>SG_161222</code>."
          },
          "types": {
            "title": "Model types (Models mode)",
            "type": "array",
            "description": "Restrict to specific model types.",
            "items": {
              "type": "string",
              "enum": [
                "Checkpoint",
                "TextualInversion",
                "Hypernetwork",
                "AestheticGradient",
                "LORA",
                "LoCon",
                "DoRA",
                "Controlnet",
                "Upscaler",
                "MotionModule",
                "VAE",
                "Poses",
                "Wildcards",
                "Workflows",
                "Detection",
                "Other"
              ]
            },
            "default": []
          },
          "baseModels": {
            "title": "Base models (Models mode)",
            "type": "array",
            "description": "Filter by base model, e.g. <code>SD 1.5</code>, <code>SDXL 1.0</code>, <code>Pony</code>, <code>Flux.1 D</code>, <code>Illustrious</code>.",
            "items": {
              "type": "string"
            }
          },
          "tag": {
            "title": "Tag (Models mode)",
            "type": "string",
            "description": "Filter models by a single tag, e.g. <code>anime</code>, <code>photorealistic</code>, <code>character</code>."
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "Most Downloaded",
              "Highest Rated",
              "Newest",
              "Most Liked",
              "Most Discussed",
              "Most Collected",
              "Most Reactions",
              "Most Comments"
            ],
            "type": "string",
            "description": "How to order results. Model sorts: Highest Rated / Most Downloaded / Newest / Most Liked / Most Discussed / Most Collected. Image sorts use Most Reactions / Most Comments / Newest.",
            "default": "Most Downloaded"
          },
          "period": {
            "title": "Time period",
            "enum": [
              "AllTime",
              "Year",
              "Month",
              "Week",
              "Day"
            ],
            "type": "string",
            "description": "Window for sort metrics (e.g. Most Downloaded this Week vs All Time).",
            "default": "AllTime"
          },
          "nsfw": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Include NSFW models/images. Default off (SFW only).",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum models / images / creators to scrape. The API returns up to 100 per page and paginates automatically.",
            "default": 100
          },
          "maxImagesPerModel": {
            "title": "Sample images per model",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many sample images (with prompts/params) to attach to each model's latest version. 0 = none (smaller, cheaper records).",
            "default": 4
          },
          "includeAllVersions": {
            "title": "Include all model versions",
            "type": "boolean",
            "description": "Attach the full version history (files, downloads, images) for each model, not just the latest version.",
            "default": false
          },
          "emitCreatorLeads": {
            "title": "Also emit creator-lead records",
            "type": "boolean",
            "description": "For every model/image scraped, also output one deduplicated creator-lead record (type = \"creator\") for its author.",
            "default": false
          },
          "enrichCreatorProfiles": {
            "title": "Enrich creators with socials & monetization links",
            "type": "boolean",
            "description": "Open each creator's Civitai profile to extract their external links — website, Patreon / Ko-fi / Boosty, Twitter/X, Instagram, YouTube, Discord, etc. — plus a 0–100 lead score. Adds one fast page per creator. (On by default in Creators mode.)",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new releases",
            "type": "boolean",
            "description": "Remember every model / image / creator id across runs in a named key-value store and emit ONLY records not seen before — new models, new images, new creators. Perfect for tracking fresh releases. Works with Apify Schedules.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved search so different watches keep separate state.",
            "default": "default"
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip records already emitted in this run (recommended).",
            "default": true
          },
          "apiToken": {
            "title": "Civitai API token (optional)",
            "type": "string",
            "description": "Optional Civitai API key for higher rate limits and access to more content. Not required — the actor works keyless."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Civitai's API is clean on Apify datacenter proxy, so the default is datacenter (fast + cheap). A fresh proxy session per request handles the occasional rate-limit.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}