{
  "openapi": "3.0.1",
  "info": {
    "title": "Leads de Empresas CNPJ (Receita Federal) - CNAE e Cidade",
    "description": "Lista de empresas ativas do Brasil por CNAE, cidade e data de abertura, com e-mail, celular com link de WhatsApp e aviso de contato de contador. Base oficial de CNPJ da Receita, atualizada todo mês.",
    "version": "0.1",
    "x-build-id": "DdCFpNSWo8HAVjfOM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/roomy_tweet~cnpj-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-roomy_tweet-cnpj-leads",
        "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/roomy_tweet~cnpj-leads/runs": {
      "post": {
        "operationId": "runs-sync-roomy_tweet-cnpj-leads",
        "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/roomy_tweet~cnpj-leads/run-sync": {
      "post": {
        "operationId": "run-sync-roomy_tweet-cnpj-leads",
        "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": {
          "cnaes": {
            "title": "CNAEs",
            "type": "array",
            "description": "Códigos CNAE, completos ou só o começo: \"5611201\" (restaurantes), \"5611\" (restaurantes, bares e lanchonetes), \"56\" (toda a alimentação). Também aceita \"5611-2/01\". Olha a atividade principal da empresa. Pra buscar um código, use a busca de CNAE do IBGE (concla.ibge.gov.br).",
            "items": {
              "type": "string"
            }
          },
          "incluirCnaesSecundarios": {
            "title": "Buscar também nos CNAEs secundários",
            "type": "boolean",
            "description": "Também traz empresas que têm o CNAE como atividade secundária. A busca fica mais lenta: o estado de SP inteiro leva cerca de 1 minuto.",
            "default": false
          },
          "palavrasNoNome": {
            "title": "Palavras no nome",
            "type": "array",
            "description": "Só empresas cuja razão social ou nome fantasia contém alguma dessas palavras, sem ligar pra acento e maiúscula. \"pizza\" acha PIZZARIA DO ZE; \"auto pecas\" acha AUTO PEÇAS SILVA. Funciona sozinho ou junto com CNAE.",
            "items": {
              "type": "string"
            }
          },
          "ufs": {
            "title": "UFs",
            "type": "array",
            "description": "Estados. Vazio = Brasil inteiro, ou só os estados dos municípios escolhidos.",
            "items": {
              "type": "string",
              "enum": [
                "AC",
                "AL",
                "AM",
                "AP",
                "BA",
                "CE",
                "DF",
                "ES",
                "GO",
                "MA",
                "MG",
                "MS",
                "MT",
                "PA",
                "PB",
                "PE",
                "PI",
                "PR",
                "RJ",
                "RN",
                "RO",
                "RR",
                "RS",
                "SC",
                "SE",
                "SP",
                "TO"
              ]
            },
            "default": []
          },
          "municipios": {
            "title": "Municípios",
            "type": "array",
            "description": "Cidades, como \"Campinas, SP\", \"Belo Horizonte/MG\" ou o código IBGE \"3509502\". Sem o estado, entram todas as cidades com esse nome.",
            "items": {
              "type": "string"
            }
          },
          "abertasDesde": {
            "title": "Abertas a partir de",
            "type": "string",
            "description": "Data mínima de abertura da empresa: AAAA-MM-DD ou relativa, como \"30 days\" ou \"3 months\", contada a partir do dia da execução."
          },
          "abertasAte": {
            "title": "Abertas até",
            "type": "string",
            "description": "Data máxima de abertura da empresa: AAAA-MM-DD ou relativa."
          },
          "portes": {
            "title": "Porte",
            "type": "array",
            "description": "MEI, Microempresa (ME), Empresa de pequeno porte (EPP) ou Demais (médias e grandes). Vazio = todos.",
            "items": {
              "type": "string",
              "enum": [
                "MEI",
                "ME",
                "EPP",
                "DEMAIS",
                "NAO_INFORMADO"
              ],
              "enumTitles": [
                "MEI",
                "Microempresa (ME)",
                "Empresa de pequeno porte (EPP)",
                "Demais (médias e grandes)",
                "Não informado"
              ]
            },
            "default": []
          },
          "simples": {
            "title": "Simples Nacional",
            "enum": [
              "qualquer",
              "sim",
              "nao"
            ],
            "type": "string",
            "description": "Filtra pela opção pelo Simples Nacional na data da base.",
            "default": "qualquer"
          },
          "apenasMatriz": {
            "title": "Só matrizes",
            "type": "boolean",
            "description": "Tira as filiais: fica só o estabelecimento matriz de cada empresa.",
            "default": false
          },
          "capitalMinimo": {
            "title": "Capital social mínimo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Em reais. Deixe vazio pra não filtrar."
          },
          "capitalMaximo": {
            "title": "Capital social máximo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Em reais. Deixe vazio pra não filtrar."
          },
          "exigirTelefone": {
            "title": "Só com telefone",
            "type": "boolean",
            "description": "Só empresas com pelo menos um telefone cadastrado.",
            "default": false
          },
          "exigirCelular": {
            "title": "Só com celular (WhatsApp)",
            "type": "boolean",
            "description": "Só empresas com celular. O número sai no formato +55 com o 9 na frente e um link do WhatsApp.",
            "default": false
          },
          "exigirEmail": {
            "title": "Só com e-mail",
            "type": "boolean",
            "description": "Só empresas com e-mail cadastrado.",
            "default": false
          },
          "ignorarContatosCompartilhados": {
            "title": "Ignorar e-mail/telefone de contador",
            "type": "boolean",
            "description": "Tira do resultado os e-mails e telefones que se repetem em 5 ou mais empresas diferentes, quase sempre do contador ou da plataforma que abriu o CNPJ. Com isso ligado, os filtros \"Só com...\" contam só os contatos que sobram. Desligado, esses contatos vêm marcados como compartilhados.",
            "default": false
          },
          "incluirSocios": {
            "title": "Incluir sócios (QSA)",
            "type": "boolean",
            "description": "Adiciona o quadro de sócios (QSA): nome, qualificação, data de entrada e faixa etária. O CPF vem mascarado pela própria Receita. Cobrado à parte, só nas empresas que têm sócios.",
            "default": false
          },
          "maxResultados": {
            "title": "Máximo de resultados",
            "minimum": 0,
            "type": "integer",
            "description": "Para depois de entregar esse número de empresas. Use pra controlar o gasto. 0 = sem limite.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}