{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil CNPJ Company Leads – Lista de Empresas por CNAE e Cidade",
    "description": "Brazil company leads (empresas por CNAE, cidade e UF) from the Receita Federal CNPJ register: active companies with phone, address, CNAE, size, capital and opening date. MEI excluded by default. $0.50 per 1,000 companies; filtered-out rows are free.",
    "version": "0.1",
    "x-build-id": "5EgPTgL0xmq6orPBp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~brazil-cnpj-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-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/gazidev~brazil-cnpj-leads/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-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/gazidev~brazil-cnpj-leads/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-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": {
          "cnaeCodes": {
            "title": "CNAE codes (atividade econômica)",
            "type": "array",
            "description": "Activity codes, with or without punctuation: `8630504` or `86.30-5/04`. A shorter prefix such as `86305` expands to all its subclasses. Up to 10 codes per run. At least one code (or `cnaeSearch`) is required.",
            "items": {
              "type": "string"
            }
          },
          "cnaeSearch": {
            "title": "...or find CNAE by words (Portuguese)",
            "type": "string",
            "description": "Words that must all appear in the official CNAE description, e.g. `odontológica`, `restaurantes e similares`, `desenvolvimento de programas`. Accents do not matter. The matching codes are added to the list above (max 10)."
          },
          "municipalities": {
            "title": "Cities (municípios)",
            "type": "array",
            "description": "`City/UF`, e.g. `Campinas/SP`, or an IBGE code such as `3509502`. Up to 50. If set, only these cities are searched.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States (UF)",
            "type": "array",
            "description": "Whole-state search, used only when no city is given (up to 5 states). With cities, it only helps to tell cities with the same name apart.",
            "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": [
                "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"
              ]
            }
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many companies. You pay per company delivered.",
            "default": 50
          },
          "status": {
            "title": "Registration status (situação cadastral)",
            "type": "array",
            "description": "Default: active companies only.",
            "items": {
              "type": "string",
              "enum": [
                "ATIVA",
                "BAIXADA",
                "INAPTA",
                "SUSPENSA",
                "NULA"
              ],
              "enumTitles": [
                "ATIVA",
                "BAIXADA",
                "INAPTA",
                "SUSPENSA",
                "NULA"
              ]
            },
            "default": [
              "ATIVA"
            ]
          },
          "openedAfter": {
            "title": "Opened on or after",
            "type": "string",
            "description": "`2026-01-01` or relative, e.g. `6 months`. The source does not sort by date, so a narrow date range needs a higher `maxScannedRows`."
          },
          "openedBefore": {
            "title": "Opened on or before",
            "type": "string",
            "description": "`2020-12-31` or relative, e.g. `5 years`."
          },
          "porte": {
            "title": "Company size (porte)",
            "type": "array",
            "description": "Leave empty for all sizes.",
            "items": {
              "type": "string",
              "enum": [
                "ME",
                "EPP",
                "DEMAIS",
                "NAO_INFORMADO"
              ],
              "enumTitles": [
                "ME (micro)",
                "EPP (small)",
                "DEMAIS (medium and large)",
                "Not informed"
              ]
            }
          },
          "onlyWithPhone": {
            "title": "Only with phone",
            "type": "boolean",
            "description": "Skip companies without a phone number.",
            "default": false
          },
          "headOfficeOnly": {
            "title": "Head offices only (matriz)",
            "type": "boolean",
            "description": "Skip branches (filiais).",
            "default": false
          },
          "excludeMei": {
            "title": "Exclude MEI",
            "type": "boolean",
            "description": "Skip individual micro-entrepreneurs (MEI). Their company name and phone are usually personal data, so this is on by default.",
            "default": true
          },
          "minCapital": {
            "title": "Minimum share capital (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip companies with a lower capital social."
          },
          "legalNatureCodes": {
            "title": "Legal nature codes (natureza jurídica)",
            "type": "array",
            "description": "4-digit codes, e.g. `2062` (Ltda), `2054` (S/A fechada), `2135` (sole proprietor). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "includeSecondaryCnae": {
            "title": "Match secondary CNAE too",
            "type": "boolean",
            "description": "Also return companies that list the CNAE as a secondary activity. Needs `municipalities`.",
            "default": false
          },
          "includePartners": {
            "title": "Include partners (QSA)",
            "type": "boolean",
            "description": "Add partner names, roles and entry dates as published (CPFs are masked by the Receita). This is personal data under the LGPD, so it is off by default.",
            "default": false
          },
          "maxScannedRows": {
            "title": "Max scanned rows",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety limit on register rows read, matching or not. The source is a free volunteer-run service: raise this only when you need it. Hard cap 10,000 per run.",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}