{
  "openapi": "3.0.1",
  "info": {
    "title": "Lista de Empresas por CNAE (CNPJ): Brazil Company Leads",
    "description": "Lista de empresas ativas do Brasil por CNAE, estado, cidade, porte e data de abertura, com CNPJ, endereço, telefone, e-mail e sócios (QSA). Dados oficiais da Receita Federal, atualizados todo mês. Brazil company leads by industry and city.",
    "version": "0.1",
    "x-build-id": "10onQJjKtspmHEcZg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowfinch~brazil-cnpj-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowfinch-brazil-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/rowfinch~brazil-cnpj-leads/runs": {
      "post": {
        "operationId": "runs-sync-rowfinch-brazil-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/rowfinch~brazil-cnpj-leads/run-sync": {
      "post": {
        "operationId": "run-sync-rowfinch-brazil-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": "Activities (CNAE)",
            "type": "array",
            "description": "Full code (5611-2/01) or a prefix: 5611 covers every restaurant subclass, 56 the whole food service division. Leave empty for all activities.",
            "items": {
              "type": "string"
            }
          },
          "matchSecondaryCnaes": {
            "title": "Also match secondary activities",
            "type": "boolean",
            "description": "Catches companies that do this activity alongside a different main one.",
            "default": false
          },
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty for the whole country.",
            "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"
              ],
              "enumTitles": [
                "Acre",
                "Alagoas",
                "Amazonas",
                "Amapá",
                "Bahia",
                "Ceará",
                "Distrito Federal",
                "Espírito Santo",
                "Goiás",
                "Maranhão",
                "Minas Gerais",
                "Mato Grosso do Sul",
                "Mato Grosso",
                "Pará",
                "Paraíba",
                "Pernambuco",
                "Piauí",
                "Paraná",
                "Rio de Janeiro",
                "Rio Grande do Norte",
                "Rondônia",
                "Roraima",
                "Rio Grande do Sul",
                "Santa Catarina",
                "Sergipe",
                "São Paulo",
                "Tocantins"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names, e.g. Campinas or Campinas/SP. Accents and capitals don't matter.",
            "items": {
              "type": "string"
            }
          },
          "sizes": {
            "title": "Company size",
            "uniqueItems": true,
            "type": "array",
            "description": "Leave empty for every size.",
            "items": {
              "type": "string",
              "enum": [
                "MEI",
                "ME",
                "EPP",
                "DEMAIS"
              ],
              "enumTitles": [
                "MEI (individual micro-entrepreneur)",
                "ME (micro company)",
                "EPP (small company)",
                "Other (medium and large)"
              ]
            }
          },
          "openedFrom": {
            "title": "Opened on or after",
            "type": "string",
            "description": "Registration date (data de início de atividade). A period like 30 days counts back from today, for scheduled runs."
          },
          "openedTo": {
            "title": "Opened on or before",
            "type": "string",
            "description": "Leave empty to include up to the latest release."
          },
          "headquartersOnly": {
            "title": "Headquarters only",
            "type": "boolean",
            "description": "Skip branches (filiais).",
            "default": false
          },
          "withPhone": {
            "title": "Only with phone",
            "type": "boolean",
            "description": "Up to two phones per company, as registered with Receita Federal.",
            "default": false
          },
          "withEmail": {
            "title": "Only with email",
            "type": "boolean",
            "description": "Registered emails often belong to the company's accountant.",
            "default": false
          },
          "includePartners": {
            "title": "Include partners (QSA)",
            "type": "boolean",
            "description": "Adds each company's partners: name, role, entry date and age range. Charged per company that has partners.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum companies",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "The run stops at this number, which also caps the cost.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}