{
  "openapi": "3.0.1",
  "info": {
    "title": "Civitai Models Scraper",
    "description": "Get Civitai models by keyword, model ID, or link. Each model comes with its creator, stats, license terms, all versions, download links, file hashes, and preview images. Filter by model type, base model, creator, or tag.",
    "version": "0.0",
    "x-build-id": "kl828e1GCGAhDxU73"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~civitai-models/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-civitai-models",
        "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/maximedupre~civitai-models/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-civitai-models",
        "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/maximedupre~civitai-models/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-civitai-models",
        "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": {
          "maxItems": {
            "title": "Max models",
            "minimum": 0,
            "type": "integer",
            "description": "The most models to get. Leave it empty or set 0 to get all models that match."
          },
          "findBy": {
            "title": "Find models by",
            "enum": [
              "search",
              "modelIds",
              "modelUrls"
            ],
            "type": "string",
            "description": "Search: find models by keyword, or browse the top models when you give no keyword. Model IDs and Model links: get the exact models you list.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to search for, one per line. Each keyword is a separate search. Leave it empty to browse the top models with the sort and filters below.",
            "items": {
              "type": "string"
            }
          },
          "modelTypes": {
            "title": "Model types",
            "type": "array",
            "description": "Get only these model types. Leave it empty to get all types. You can also type a type name that Civitai uses.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "Checkpoint",
                "TextualInversion",
                "Hypernetwork",
                "AestheticGradient",
                "LORA",
                "LoCon",
                "DoRA",
                "Controlnet",
                "Upscaler",
                "MotionModule",
                "VAE",
                "Poses",
                "Wildcards",
                "Workflows",
                "Detection",
                "Other"
              ],
              "enumTitles": [
                "Checkpoint",
                "Embedding (TextualInversion)",
                "Hypernetwork",
                "Aesthetic Gradient",
                "LoRA",
                "LyCORIS (LoCon)",
                "DoRA",
                "ControlNet",
                "Upscaler",
                "Motion",
                "VAE",
                "Poses",
                "Wildcards",
                "Workflows",
                "Detection",
                "Other"
              ]
            }
          },
          "baseModels": {
            "title": "Base models",
            "type": "array",
            "description": "Get only models made for these base models. Leave it empty to get all. You can also type any base model name exactly as Civitai shows it.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "SD 1.5",
                "SDXL 1.0",
                "Pony",
                "Illustrious",
                "NoobAI",
                "Flux.1 D",
                "Flux.1 S",
                "SD 3.5"
              ]
            }
          },
          "creators": {
            "title": "Creators",
            "type": "array",
            "description": "Get only models made by these Civitai creators. Enter usernames, one per line.",
            "items": {
              "type": "string"
            }
          },
          "tag": {
            "title": "Tag",
            "type": "string",
            "description": "Get only models with this Civitai tag, such as character or style."
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "Most Downloaded",
              "Highest Rated",
              "Most Liked",
              "Most Discussed",
              "Most Collected",
              "Most Images",
              "Newest"
            ],
            "type": "string",
            "description": "The order Civitai uses for the results.",
            "default": "Most Downloaded"
          },
          "period": {
            "title": "Time period",
            "enum": [
              "AllTime",
              "Year",
              "Month",
              "Week",
              "Day"
            ],
            "type": "string",
            "description": "The time period whose stats rank the models.",
            "default": "AllTime"
          },
          "includeMatureContent": {
            "title": "Include mature (NSFW) models",
            "type": "boolean",
            "description": "Also get models that Civitai marks as mature.",
            "default": false
          },
          "onlyNewModels": {
            "title": "Only new models",
            "type": "boolean",
            "description": "Get only models that earlier runs of this same search did not find. Use it to follow a saved search over time.",
            "default": false
          },
          "modelIds": {
            "title": "Model IDs",
            "type": "array",
            "description": "Civitai model IDs, one per line. The ID is the number in a model link, such as 4201 in https://civitai.com/models/4201.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          "modelUrls": {
            "title": "Model links",
            "type": "array",
            "description": "Full Civitai model page links, such as https://civitai.com/models/4201.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}