{
  "openapi": "3.0.1",
  "info": {
    "title": "Black Cat Complaints Scraper - China Consumer Complaints",
    "description": "Scrape Black Cat (黑猫投诉, tousu.sina.com.cn), China's largest consumer complaint platform, without login: every complaint of a company with title, summary, demands, issues, amount, status and date, plus company totals. English brand names, word filters, only-new mode.",
    "version": "0.1",
    "x-build-id": "ec02l3hGDejiZ3u7n"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~black-cat-complaints-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-black-cat-complaints-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/scrapewise~black-cat-complaints-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-black-cat-complaints-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/scrapewise~black-cat-complaints-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-black-cat-complaints-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": {
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Company names as on Black Cat (小米, 拼多多, 京东, 美团), company ids (couid) or company page links. Returns the complaints the company received, newest first.",
            "items": {
              "type": "string"
            }
          },
          "companySearch": {
            "title": "Search companies",
            "type": "array",
            "description": "Keywords (银行, 保险, 外卖, 航空). Returns the matching companies with their complaint, reply and resolution totals, all time and last 30 days: good for comparing brands.",
            "items": {
              "type": "string"
            }
          },
          "latestFeed": {
            "title": "Latest complaints on the home page",
            "type": "boolean",
            "description": "The newest complaints across all companies.",
            "default": false
          },
          "status": {
            "title": "Complaint status",
            "enum": [
              "latest",
              "replied",
              "completed"
            ],
            "type": "string",
            "description": "Which list of the company to read.",
            "default": "latest"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Only complaints published on or after this date: YYYY-MM-DD, or a number of days (30 = last 30 days)."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Only complaints published on or before this date (YYYY-MM-DD). With publishedAfter it makes a date window."
          },
          "includeKeywords": {
            "title": "Only complaints mentioning",
            "type": "array",
            "description": "Keep only complaints whose title, summary, issues or demands contain at least one of these words (for example 退款, 质量, 客服). Black Cat's own text search needs a login, so this filter runs here; skipped complaints are not charged.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Leave out complaints mentioning",
            "type": "array",
            "description": "Drop complaints that contain any of these words (not charged).",
            "items": {
              "type": "string"
            }
          },
          "onlyNew": {
            "title": "Only new complaints since the last run",
            "type": "boolean",
            "description": "For scheduled runs. Remembers which complaints each company already returned, in a named key-value store in your account ('black-cat-complaints-state'), and delivers only complaints not seen before. Already delivered complaints are not charged. Delete the store to start over.",
            "default": false
          },
          "maxComplaintsPerCompany": {
            "title": "Max complaints per company",
            "minimum": 0,
            "type": "integer",
            "description": "Upper limit per company (and for the latest feed). 0 = every complaint the company has (big brands have hundreds of thousands).",
            "default": 100
          },
          "maxCompaniesPerSearch": {
            "title": "Max companies per search",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit per company search keyword.",
            "default": 20
          },
          "maxItems": {
            "title": "Max rows in the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap for the whole run, complaints and company rows together. Also works as a spend cap. Empty or 0 = no cap."
          },
          "includeCompanyProfile": {
            "title": "Company row for each company",
            "type": "boolean",
            "description": "One row with the company's totals when a company is given by name.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is recommended.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}