{
  "openapi": "3.0.1",
  "info": {
    "title": "ReclameAqui Scraper - Complaints, Reputation & Company Intel BR",
    "description": "Scrape ReclameAqui (Brazil): the full company reply thread, reputation scores, and company intel — by company slug, URL, name, or free-text search. Each complaint includes the consumer-company conversation and a structured reputation scorecard for due diligence.",
    "version": "0.1",
    "x-build-id": "RJIxYp8Gyb71gBs10"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~reclameaqui-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-reclameaqui-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/blackfalcondata~reclameaqui-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-reclameaqui-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/blackfalcondata~reclameaqui-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-reclameaqui-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": "Companies to scrape — each entry can be a ReclameAqui **slug** (`nubank`), a full company **URL** (`https://www.reclameaqui.com.br/empresa/nubank/`), or a company **name** (`Nubank`). Names and URLs are resolved automatically.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🔎 Search queries",
            "type": "array",
            "description": "Free-text complaint searches across the whole platform (e.g. `atraso entrega`, `cobrança indevida`). Returns matching complaints from any company. Use instead of, or alongside, `companies`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeCompanyProfile": {
            "title": "🏅 Include company reputation record",
            "type": "boolean",
            "description": "Emit one company record per company with reputation score, RA status, response/resolution/recommendation rates, complaint counts by period, segment ranking, top problems, CNPJ and contacts.",
            "default": true
          },
          "scrapeComplaints": {
            "title": "🗣️ Scrape complaints",
            "type": "boolean",
            "description": "Emit complaint records for each company / search query.",
            "default": true
          },
          "includeInteractions": {
            "title": "💬 Include full reply thread",
            "type": "boolean",
            "description": "Enrich each complaint with the complete back-and-forth thread (company answers + consumer replies + final evaluation) and structured category/problem/product taxonomy. Adds one request per complaint. Turn off for a faster, lighter pull.",
            "default": true
          },
          "extractContacts": {
            "title": "📇 Extract contacts",
            "type": "boolean",
            "description": "Mine emails, phones, URLs and social profiles from complaint bodies and company info.",
            "default": true
          },
          "statusFilter": {
            "title": "🔖 Complaint status",
            "type": "array",
            "description": "Which complaint buckets to pull. `LATEST` = all recent complaints.",
            "items": {
              "type": "string",
              "enum": [
                "LATEST",
                "EVALUATED",
                "ANSWERED",
                "SOLVED"
              ],
              "enumTitles": [
                "Latest (all)",
                "Evaluated by consumer",
                "Answered by company",
                "Solved"
              ]
            },
            "default": [
              "LATEST"
            ]
          },
          "dateFrom": {
            "title": "📅 Date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only complaints created on or after this date (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "📅 Date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only complaints created on or before this date (YYYY-MM-DD)."
          },
          "maxComplaintsPerCompany": {
            "title": "🔢 Max complaints per company / query",
            "minimum": 0,
            "type": "integer",
            "description": "Cap complaints pulled per company (or per search query). 0 = unlimited for companies; free-text searches cap at 200 per query.",
            "default": 100
          },
          "maxItems": {
            "title": "💯 Max total records",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap across all records (companies + complaints). 0 = unlimited.",
            "default": 0
          },
          "compact": {
            "title": "📦 Compact output",
            "type": "boolean",
            "description": "Emit a slim subset of fields (ids, headline reputation, complaint status) for lighter datasets.",
            "default": false
          },
          "descriptionFormat": {
            "title": "📝 Description format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Which complaint description variants to keep: all (text + HTML + Markdown), plain text only, HTML only, or Markdown only.",
            "default": "all"
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude empty fields",
            "type": "boolean",
            "description": "Drop null / empty fields from every record for a leaner dataset.",
            "default": false
          },
          "descriptionMaxLength": {
            "title": "✂️ Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate complaint description / text to this many characters (0 = no limit).",
            "default": 0
          },
          "incrementalMode": {
            "title": "🔁 Incremental mode",
            "type": "boolean",
            "description": "Track complaints across runs and classify each as NEW / UPDATED / UNCHANGED / REAPPEARED / EXPIRED. Only changed complaints are emitted by default.",
            "default": false
          },
          "stateKey": {
            "title": "🗝️ State key",
            "type": "string",
            "description": "Override the automatic incremental state key (advanced — share state across runs)."
          },
          "emitUnchanged": {
            "title": "♻️ Emit unchanged",
            "type": "boolean",
            "description": "In incremental mode, also emit complaints with no changes.",
            "default": false
          },
          "emitExpired": {
            "title": "⚰️ Emit expired",
            "type": "boolean",
            "description": "In incremental mode, emit complaints that disappeared from the source (only when full coverage is proven).",
            "default": false
          },
          "telegramToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Send a summary of new records to Telegram."
          },
          "telegramChatId": {
            "title": "💬 Telegram chat ID",
            "type": "string",
            "description": "Target Telegram chat ID."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Post a summary to Discord."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Post a summary to Slack."
          },
          "whatsappAccessToken": {
            "title": "WhatsApp access token",
            "type": "string",
            "description": "WhatsApp Cloud API token."
          },
          "whatsappPhoneNumberId": {
            "title": "WhatsApp phone number ID",
            "type": "string",
            "description": "WhatsApp Cloud API sender phone number ID."
          },
          "whatsappTo": {
            "title": "WhatsApp recipient",
            "type": "string",
            "description": "Recipient phone number in international format."
          },
          "webhookUrl": {
            "title": "Generic webhook URL",
            "type": "string",
            "description": "POST new records to any webhook (n8n, Make, Zapier)."
          },
          "webhookHeaders": {
            "title": "Webhook headers",
            "type": "object",
            "description": "Optional headers for the generic webhook. Note: stored with your run input — avoid embedding long-lived secrets where a per-request token works."
          },
          "notificationLimit": {
            "title": "Notification limit",
            "minimum": 1,
            "type": "integer",
            "description": "Max records included per notification.",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "Notify only changes",
            "type": "boolean",
            "description": "Only notify on changed records (incremental mode).",
            "default": false
          },
          "minDelayMs": {
            "title": "⏱️ Min delay (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Politeness delay between request batches.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. The actor runs fine without a proxy; configure one only if you want requests routed through it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}