{
  "openapi": "3.0.1",
  "info": {
    "title": "Extrator de CNPJ Brasil",
    "description": "Este ator extrai dados de empresas cadastradas na receita federal, o scraping é feito na base mais atualizada existente.",
    "version": "0.0",
    "x-build-id": "3iDHijRpPvKsTbhbW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wandersonsousa~cnpj-brasil-extrator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wandersonsousa-cnpj-brasil-extrator",
        "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/wandersonsousa~cnpj-brasil-extrator/runs": {
      "post": {
        "operationId": "runs-sync-wandersonsousa-cnpj-brasil-extrator",
        "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/wandersonsousa~cnpj-brasil-extrator/run-sync": {
      "post": {
        "operationId": "run-sync-wandersonsousa-cnpj-brasil-extrator",
        "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": {
          "search_type": {
            "title": "Tipo da busca",
            "enum": [
              "basic_search_bellow_1000",
              "spread_cnaes_search",
              "auto_cnaes_search",
              "spread_date_search",
              "spreads_cnaes_date",
              "auto_cnaes_spread_date_search"
            ],
            "type": "string",
            "description": "Tipo da busca"
          },
          "shoudScrapeCompleteData": {
            "title": "Extrair dados completos",
            "type": "boolean",
            "description": "Ativando essa opção a busca será mais lenta",
            "default": false
          },
          "estados": {
            "title": "Estados",
            "type": "array",
            "description": "Estados",
            "items": {
              "type": "string"
            }
          },
          "razaoOuNomeFantasia": {
            "title": "Razão social ou Nome Fantasia",
            "type": "array",
            "description": "Razão Social ou Nome Fantasia",
            "items": {
              "type": "string"
            }
          },
          "cnaes": {
            "title": "CNAEs",
            "type": "array",
            "description": "CNAEs",
            "items": {
              "type": "string"
            }
          },
          "naturezaJuridica": {
            "title": "Natureza Jurídica",
            "type": "array",
            "description": "Natureza Jurídica",
            "items": {
              "type": "string"
            }
          },
          "municipios": {
            "title": "Municípios",
            "type": "array",
            "description": "Municípios",
            "items": {
              "type": "string"
            }
          },
          "situacaoCadastral": {
            "title": "Situação Cadastral",
            "enum": [
              "ATIVA",
              "BAIXADA",
              "INAPTA",
              "SUSPENSA",
              "NULA"
            ],
            "type": "string",
            "description": "Situação Cadastral"
          },
          "ceps": {
            "title": "CEPs",
            "type": "array",
            "description": "CEPs",
            "items": {
              "type": "string"
            }
          },
          "DDDs": {
            "title": "DDDs",
            "type": "array",
            "description": "DDDs",
            "items": {
              "type": "string"
            }
          },
          "dataAberturaDe": {
            "title": "Data de Abertura De",
            "pattern": "\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "dataAberturaAte": {
            "title": "Data de Abertura Até",
            "pattern": "\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "capitalSocialDe": {
            "title": "Capital Social De",
            "type": "string",
            "description": "Capital Social De"
          },
          "capitalSocialAte": {
            "title": "Capital Social Até",
            "type": "string",
            "description": "Capital Social Até"
          },
          "somenteMei": {
            "title": "Somente MEI",
            "type": "boolean",
            "description": "Somente MEI",
            "default": false
          },
          "excluirMei": {
            "title": "Excluir MEI",
            "type": "boolean",
            "description": "Excluir MEI",
            "default": false
          },
          "comEmail": {
            "title": "Com E-mail",
            "type": "boolean",
            "description": "Com E-mail",
            "default": false
          },
          "incluirAtividadeSecundaria": {
            "title": "Incluir Atividade Secundária",
            "type": "boolean",
            "description": "Incluir Atividade Secundária",
            "default": false
          },
          "comContatoTelefonico": {
            "title": "Com contato telefônico",
            "type": "boolean",
            "description": "Com contato telefônico",
            "default": false
          },
          "somenteFixo": {
            "title": "Somente fixo",
            "type": "boolean",
            "description": "Somente fixo",
            "default": false
          },
          "somenteCelular": {
            "title": "Somente celular",
            "type": "boolean",
            "description": "Somente celular",
            "default": false
          },
          "somenteMatriz": {
            "title": "Somente matriz",
            "type": "boolean",
            "description": "Somente matriz",
            "default": false
          },
          "somenteFilial": {
            "title": "Somente filial",
            "type": "boolean",
            "description": "Somente filial",
            "default": false
          },
          "apiorigin": {
            "title": "Requisição da api",
            "type": "boolean",
            "description": "Requisição da api",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}