{
  "openapi": "3.0.1",
  "info": {
    "title": "CNPJ Lookup & Brazil Company Leads — Receita Federal",
    "description": "Brazilian companies (CNPJ) by industry (CNAE), state, city, size and opening date, plus bulk CNPJ lookup from a list or CSV. Company phone, role e-mail, verified website, accountant flag. No scraping. PT: consulta CNPJ em lote, leads de empresas, empresas abertas recentemente.",
    "version": "0.3",
    "x-build-id": "RhNS3CH6v0yqS6jb3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/latsouth~brazil-company-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-latsouth-brazil-company-finder",
        "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/latsouth~brazil-company-finder/runs": {
      "post": {
        "operationId": "runs-sync-latsouth-brazil-company-finder",
        "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/latsouth~brazil-company-finder/run-sync": {
      "post": {
        "operationId": "run-sync-latsouth-brazil-company-finder",
        "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": {
          "mode": {
            "title": "Mode (modo)",
            "enum": [
              "search",
              "new_companies",
              "lookup"
            ],
            "type": "string",
            "description": "search = filter the registry (industry, state, city, size...). new_companies = same filters, only companies opened in the last N days (see 'Opened in the last N days'), newest first. lookup = one record per CNPJ you send (list or CSV); the search filters are ignored. PT: search = busca por filtros; new_companies = empresas abertas recentemente; lookup = consulta CNPJ em lote.",
            "default": "search"
          },
          "cnpjs": {
            "title": "CNPJs to look up (lookup mode)",
            "type": "array",
            "description": "14-digit CNPJs, formatted or not (11.222.333/0001-81 or 11222333000181), including the new alphanumeric CNPJ (12.ABC.345/01DE-35). An 8-digit root (11222333) returns the head office (matriz). Spreadsheet numbers that lost their leading zeros are repaired when the check digits match. Duplicates are returned once. CPFs are not supported (company data only). PT: CNPJ com ou sem pontuação; raiz de 8 dígitos = matriz.",
            "items": {
              "type": "string"
            }
          },
          "cnpjs_file": {
            "title": "CSV or TXT file with CNPJs (lookup mode)",
            "type": "string",
            "description": "Upload a file or paste a public URL. One CNPJ per line, or a CSV (comma, semicolon or tab) with a column whose header contains 'cnpj' (cnpj, CNPJ, cnpj_basico...). Up to 100,000 distinct CNPJs per run, 50 MB. Combined with the list above. PT: arquivo CSV/TXT com uma coluna 'cnpj'."
          },
          "include_not_found": {
            "title": "Return a row for CNPJs not found (lookup mode)",
            "type": "boolean",
            "description": "On: every CNPJ you send gets a row; the ones we don't return have not_found = true and not_found_reason (not_in_dataset = inactive/closed, MEI or other individual-owner form, or not in the Receita release; invalid_cnpj = wrong check digits; cpf_not_supported). not_in_dataset rows are charged at the lower not-found price; invalid_cnpj and cpf_not_supported rows (lookup_match = invalid, rejected on format alone) are free. Off: only found companies are returned and charged.",
            "default": true
          },
          "cnae_divisions": {
            "title": "Industry divisions (CNAE 2-digit)",
            "type": "array",
            "description": "Two-digit CNAE divisions of the main activity, e.g. 62 = IT services (software development, IT consulting), 47 = retail trade, 86 = human health. Combined with industry codes using OR. PT: divisão CNAE da atividade principal.",
            "items": {
              "type": "string"
            }
          },
          "cnae_codes": {
            "title": "Industry codes (CNAE subclass or prefix)",
            "type": "array",
            "description": "Full 7-digit CNAE subclasses (6201501 or 6201-5/01) or shorter prefixes (4-5 digits = class or group). PT: código CNAE (subclasse) ou prefixo.",
            "items": {
              "type": "string"
            }
          },
          "include_secondary_cnaes": {
            "title": "Also match secondary activities (CNAE secundário)",
            "type": "boolean",
            "description": "If on, industry codes also match companies that list the code as a secondary activity.",
            "default": false
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Case- and accent-insensitive substring searched in the English activity label and in the legal and trade names (razão social, nome fantasia), e.g. software, clinica, logistica."
          },
          "states": {
            "title": "States (UF)",
            "type": "array",
            "description": "Leave empty for all of Brazil. Selecting states makes runs faster. PT: estado (UF).",
            "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 - Acre",
                "AL - Alagoas",
                "AM - Amazonas",
                "AP - Amapa",
                "BA - Bahia",
                "CE - Ceara",
                "DF - Distrito Federal",
                "ES - Espirito Santo",
                "GO - Goias",
                "MA - Maranhao",
                "MG - Minas Gerais",
                "MS - Mato Grosso do Sul",
                "MT - Mato Grosso",
                "PA - Para",
                "PB - Paraiba",
                "PE - Pernambuco",
                "PI - Piaui",
                "PR - Parana",
                "RJ - Rio de Janeiro",
                "RN - Rio Grande do Norte",
                "RO - Rondonia",
                "RR - Roraima",
                "RS - Rio Grande do Sul",
                "SC - Santa Catarina",
                "SE - Sergipe",
                "SP - Sao Paulo",
                "TO - Tocantins"
              ]
            }
          },
          "cities": {
            "title": "Cities (cidade)",
            "type": "array",
            "description": "City names as in the federal registry, accents optional (e.g. Sao Paulo, Campinas, Belo Horizonte).",
            "items": {
              "type": "string"
            }
          },
          "company_size": {
            "title": "Company size (porte)",
            "type": "array",
            "description": "Receita 'porte'. Leave empty for all sizes. PT: ME, EPP, demais.",
            "items": {
              "type": "string",
              "enum": [
                "micro",
                "small",
                "other"
              ],
              "enumTitles": [
                "Micro (ME, revenue up to BRL 360k/yr)",
                "Small (EPP, revenue up to BRL 4.8M/yr)",
                "Other (medium and large companies)"
              ]
            }
          },
          "opened_in_last_days": {
            "title": "Opened in the last N days (abertas nos últimos N dias)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only companies opened in the N days before the registry snapshot date (data_as_of of the Receita release, shown in every row; the Receita publishes monthly, so this is not 'until today'). 30 = last month, 90 = last quarter. Mode new_companies uses 30 when empty and always sorts newest first. Works with every filter."
          },
          "opened_after": {
            "title": "Opened on or after (data de abertura)",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "opened_before": {
            "title": "Opened on or before",
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "min_share_capital": {
            "title": "Minimum share capital, BRL (capital social)",
            "minimum": 0,
            "type": "integer",
            "description": "Declared share capital of the company, in Brazilian reais."
          },
          "only_with_website": {
            "title": "Only with a website (guessed, unverified)",
            "type": "boolean",
            "description": "Keep companies that have a `website_guess`: the domain of the company's registered corporate e-mail (not Gmail/Hotmail/ISP/accounting firm/placeholder such as contato.com). It is NOT checked over HTTP and may be dead or parked. For live sites use the verified filter below.",
            "default": false
          },
          "only_with_verified_website": {
            "title": "Only with a verified website (site verificado)",
            "type": "boolean",
            "description": "Stricter: keep only companies whose `website` answered an HTTP check with a 2xx/3xx status and is not a parked, for-sale, suspended, under-construction or hosting default page. The check is at most 90 days older than the dataset build; see website_checked_at. Overrides the filter above.",
            "default": false
          },
          "only_with_email": {
            "title": "Only with a role e-mail (e-mail da empresa)",
            "type": "boolean",
            "description": "Keep only companies whose registered e-mail is a role/generic mailbox (contato@, comercial@, financeiro@, ...) on the company's own corporate domain. Personal mailboxes (joao.silva@) and free-mail/ISP addresses are never output and never count.",
            "default": false
          },
          "only_with_phone": {
            "title": "Only with a phone (telefone)",
            "type": "boolean",
            "description": "Keep only companies with a valid registered phone number: 8-digit landline (2-5) or 9-digit mobile (9) after the area code. Old-format 8-digit mobiles (6-9, no leading 9) are not output and do not count.",
            "default": false
          },
          "only_with_public_contact": {
            "title": "Only with a public contact on their own website",
            "type": "boolean",
            "description": "Keep only companies whose verified homepage publishes a company contact: a role/generic e-mail (contato@, vendas@, comercial@, ...), a phone or a company social profile, returned in `public_role_emails`, `public_phones`, `linkedin_url`, `instagram_url`, `facebook_url` with the page URL and fetch date. Domains shared by several companies or belonging to an accountant never count (their contacts are not output; only the `contact_is_shared_domain` / `contact_is_accountant_domain` flags are set). Personal mailboxes (joao.silva@) and free-mail addresses are never output.",
            "default": false
          },
          "only_with_public_email_or_phone": {
            "title": "Only with a public e-mail or phone on their own website",
            "type": "boolean",
            "description": "Stricter than the filter above: keep only companies whose own verified homepage publishes a company role e-mail (contato@, vendas@ on the company's domain) or a phone, returned in `public_role_emails` / `public_phones` (`has_public_email_or_phone` = true). A homepage with only social links does not count. Same ownership rule: shared and accountant domains never count. PT: só empresas com e-mail ou telefone publicado no próprio site.",
            "default": false
          },
          "exclude_accountant_contacts": {
            "title": "Exclude accountant contacts (contato do contador)",
            "type": "boolean",
            "description": "Many Brazilian companies register their accountant's e-mail or phone. When on, companies whose registered contact is shared by many unrelated companies (or looks like an accounting firm) are left out. In lookup mode nothing is left out: the flag is_likely_accountant_contact is returned instead.",
            "default": true
          },
          "headquarters_only": {
            "title": "Headquarters only (só matriz)",
            "type": "boolean",
            "description": "Return only head offices (matriz), not branches (filiais): one row per company. Off: every establishment, so a large company with many branches fills several rows.",
            "default": false
          },
          "exclude_public_sector": {
            "title": "Exclude the public sector (excluir setor público)",
            "type": "boolean",
            "description": "On (default): leaves out government bodies, municipalities, autarchies, public funds and foundations (legal nature 1xxx), state-owned and mixed-capital companies (2011, 2038), international bodies and foreign missions (5xxx), and any company whose main activity is public administration or extraterritorial (CNAE sections O and U). Turn off to prospect public buyers. Not used by lookup. PT: exclui órgãos públicos, prefeituras, autarquias, empresas públicas e de economia mista.",
            "default": true
          },
          "technologies": {
            "title": "Technologies on the company's website (tecnologias do site)",
            "type": "array",
            "description": "Technology ids seen on the company's own verified homepage; a company matches if it uses ANY of them. Examples: vtex, shopify, nuvemshop, loja_integrada, tray, woocommerce, magento, wix_stores, wordpress, wix, rd_station, hubspot, activecampaign, mailchimp, pipedrive, ga4, gtm, meta_pixel, tiktok_pixel, google_ads, zendesk, jivochat, blip, whatsapp_widget, mercado_pago, pagseguro, stripe, onetrust, cookieyes, cloudflare, hostinger, locaweb, bling (full list of 117 ids in the README; an unknown id stops the run and lists the valid ones). Head offices only (one row per company): branches never match. Empty = no technology filter. Also returned on every row in `technologies`. PT: tecnologias detectadas na home do site verificado.",
            "items": {
              "type": "string"
            }
          },
          "technology_categories": {
            "title": "Technology categories",
            "type": "array",
            "description": "Keep companies whose homepage uses at least one technology of ANY of these categories. Combined with the technologies above using AND (e.g. technologies = rd_station and category = ecommerce: online stores that use RD Station). Head offices only.",
            "items": {
              "type": "string",
              "enum": [
                "ecommerce",
                "cms",
                "marketing_automation",
                "crm",
                "analytics",
                "tag_manager",
                "advertising",
                "chat",
                "payments",
                "consent",
                "cdn",
                "hosting",
                "ab_testing",
                "erp"
              ],
              "enumTitles": [
                "E-commerce platform",
                "CMS / website builder",
                "Marketing automation & e-mail",
                "CRM web forms",
                "Analytics",
                "Tag manager",
                "Advertising pixels",
                "Chat & support widgets",
                "Payments",
                "Consent / LGPD cookie banner",
                "CDN / edge",
                "Hosting provider",
                "A/B testing & personalisation",
                "ERP storefront hints"
              ]
            }
          },
          "sort_by": {
            "title": "Sort by (ordenar)",
            "enum": [
              "share_capital_desc",
              "opening_date_desc",
              "opening_date_asc",
              "cnpj"
            ],
            "type": "string",
            "description": "Order of results. Largest share capital first is a good default for B2B prospecting. Mode new_companies always sorts newest first.",
            "default": "share_capital_desc"
          },
          "max_results": {
            "title": "Max results (search modes)",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "You pay per company returned (US$0.0015 each: 1,000 companies = US$1.50). The run also stops at your spending limit. Default 25 when called via API without this field (set it for more). Not used by lookup (one row per CNPJ sent)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}