---
updatedAt: 2026-05-28T19:21:10.000Z
agentTools:
  projectIndex: https://docs.notagateway.com.br/llms.txt
---

# Listar Empresas

Recupera uma lista de empresas por um critério de pesquisa

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "visão-geral",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.notagateway.com.br"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/empresas": {
      "get": {
        "summary": "Listar Empresas",
        "description": "Recupera uma lista de empresas por um critério de pesquisa",
        "operationId": "consultar-empresas-1",
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "Número da página",
            "required": true,
            "schema": {
              "type": "string",
              "default": "0"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Total de itens a serem retornados por página (Limite de 150 por página)",
            "required": true,
            "schema": {
              "type": "string",
              "default": "5"
            }
          },
          {
            "name": "searchBy",
            "in": "query",
            "description": "Campo no qual será aplicado o termo de pesquisa. Valores possíveis: nome_fantasia, razao_social, CNPJ",
            "required": true,
            "schema": {
              "type": "string",
              "default": "nome_fantasia"
            }
          },
          {
            "name": "searchTerm",
            "in": "query",
            "description": "Termo a ser pesquisado",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Campo no qual será aplicado a ordenação. Valores possíveis: \"nome_fantasia\", \"razao_social\", \"cidade\", \"data_criacao\", \"data_ultima_modificacao\"",
            "required": true,
            "schema": {
              "type": "string",
              "default": "nome_fantasia"
            }
          },
          {
            "name": "sortDirection",
            "in": "query",
            "description": "Direção na qual será feita a ordenação. Valores possíveis: asc, desc",
            "required": true,
            "schema": {
              "type": "string",
              "default": "asc"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"totalRecords\": 1,\n    \"data\": [\n        {\n            \"id\": \"string\",\n            \"status\": \"string\",\n            \"prazo\": 0,\n            \"dadosObrigatoriosPreenchidos\": true,\n            \"cnpj\": \"string\",\n            \"inscricaoMunicipal\": \"string\",\n            \"inscricaoEstadual\": null,\n            \"razaoSocial\": \"string\",\n            \"nomeFantasia\": \"string\",\n            \"optanteSimplesNacional\": true,\n            \"email\": \"string\",\n            \"telefoneComercial\": null,\n            \"endereco\": {\n                \"pais\": \"Brasil\",\n                \"uf\": \"string\",\n                \"codigoIbgeUf\": 0,\n                \"cidade\": \"string\",\n                \"codigoIbgeCidade\": 0,\n                \"logradouro\": \"string\",\n                \"numero\": \"string\",\n                \"complemento\": \"string\",\n                \"bairro\": \"string\",\n                \"cep\": \"string\"\n            },\n            \"incentivadorCultural\": null,\n            \"regimeEspecialTributacao\": \"0\",\n            \"aedf\": null,\n            \"configuracoesNFSeProducao\": {\n                \"sequencialNFe\": 0,\n                \"serieNFe\": \"NF\",\n                \"sequencialLoteNFe\": 0,\n                \"usuarioAcessoProvedor\": null,\n                \"tokenAcessoProvedor\": null\n            },\n            \"configuracoesNFSeHomologacao\": {\n                \"sequencialNFe\": 0,\n                \"serieNFe\": \"NF\",\n                \"sequencialLoteNFe\": 0,\n                \"usuarioAcessoProvedor\": null,\n                \"tokenAcessoProvedor\": null\n            },\n            \"codigoServicoMunicipal\": \"string\",\n            \"itemListaServicoLC116\": null,\n            \"cnae\": null,\n            \"aliquotaIss\": 0,\n            \"descricaoServico\": \"string\"\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalRecords": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "string"
                          },
                          "status": {
                            "type": "string",
                            "example": "string"
                          },
                          "prazo": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "dadosObrigatoriosPreenchidos": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "cnpj": {
                            "type": "string",
                            "example": "string"
                          },
                          "inscricaoMunicipal": {
                            "type": "string",
                            "example": "string"
                          },
                          "inscricaoEstadual": {},
                          "razaoSocial": {
                            "type": "string",
                            "example": "string"
                          },
                          "nomeFantasia": {
                            "type": "string",
                            "example": "string"
                          },
                          "optanteSimplesNacional": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "mei": {
                            "type": "boolean",
                            "default": ""
                          },
                          "emiteNFSeNacional": {
                            "type": "boolean"
                          },
                          "email": {
                            "type": "string",
                            "example": "string"
                          },
                          "telefoneComercial": {},
                          "endereco": {
                            "type": "object",
                            "properties": {
                              "pais": {
                                "type": "string",
                                "example": "Brasil"
                              },
                              "uf": {
                                "type": "string",
                                "example": "string"
                              },
                              "codigoIbgeUf": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "cidade": {
                                "type": "string",
                                "example": "string"
                              },
                              "codigoIbgeCidade": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "logradouro": {
                                "type": "string",
                                "example": "string"
                              },
                              "numero": {
                                "type": "string",
                                "example": "string"
                              },
                              "complemento": {
                                "type": "string",
                                "example": "string"
                              },
                              "bairro": {
                                "type": "string",
                                "example": "string"
                              },
                              "cep": {
                                "type": "string",
                                "example": "string"
                              }
                            }
                          },
                          "incentivadorCultural": {},
                          "regimeEspecialTributacao": {
                            "type": "string",
                            "example": "0"
                          },
                          "aedf": {},
                          "configuracoesNFSeProducao": {
                            "type": "object",
                            "properties": {
                              "sequencialNFe": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "serieNFe": {
                                "type": "string",
                                "example": "NF"
                              },
                              "sequencialLoteNFe": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "usuarioAcessoProvedor": {},
                              "tokenAcessoProvedor": {}
                            }
                          },
                          "configuracoesNFSeHomologacao": {
                            "type": "object",
                            "properties": {
                              "sequencialNFe": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "serieNFe": {
                                "type": "string",
                                "example": "NF"
                              },
                              "sequencialLoteNFe": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "usuarioAcessoProvedor": {},
                              "tokenAcessoProvedor": {}
                            }
                          },
                          "codigoServicoMunicipal": {
                            "type": "string",
                            "example": "string"
                          },
                          "itemListaServicoLC116": {},
                          "cnae": {},
                          "codigoNBS": {
                            "type": "string"
                          },
                          "aliquotaIss": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "descricaoServico": {
                            "type": "string",
                            "example": "string"
                          },
                          "certificadoDigital": {
                            "type": "object",
                            "properties": {
                              "nome": {
                                "type": "string"
                              },
                              "dataVencimento": {
                                "type": "string",
                                "format": "date"
                              }
                            }
                          },
                          "enviarEmailCliente": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"Message\": \"The request is invalid.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string",
                      "example": "The request is invalid."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n    {\n        \"codigo\": \"AUT002\",\n        \"mensagem\": \"Acesso negado. APIKey invalida, por favor verifique se setou o header do request corretamente com uma APIKey válida, por exemplo: \\\"Authorization: Basic {your-APIKey-here}\\\".\"\n    }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "codigo": {
                        "type": "string",
                        "example": "AUT002"
                      },
                      "mensagem": {
                        "type": "string",
                        "example": "Acesso negado. APIKey invalida, por favor verifique se setou o header do request corretamente com uma APIKey válida, por exemplo: \"Authorization: Basic {your-APIKey-here}\"."
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n    {\n        \"codigo\": \"AUT001\",\n        \"mensagem\": \"Acesso negado. APIKey invalida, por favor verifique se ela está correta.\"\n    }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "codigo": {
                        "type": "string",
                        "example": "AUT001"
                      },
                      "mensagem": {
                        "type": "string",
                        "example": "Acesso negado. APIKey invalida, por favor verifique se ela está correta."
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "Erro interno do servidor"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "csharp",
              "code": "public string ConsultarEmpresasAsync(int pageNumber, int pageSize, string searchBy = \"\", string searchTerm = \"\", string sortBy = \"\", string sortDirection = \"\")\n{\n  try\n  {\n    var parameters = new StringBuilder(string.Format(\"/empresas?pageNumber={0}&pageSize={1}\", pageNumber.ToString(), pageSize.ToString()));\n\n    if (!string.IsNullOrEmpty(searchBy))\n      parameters.Append(\"&searchBy=\" + searchBy);\n\n    if (!string.IsNullOrEmpty(searchTerm))\n      parameters.Append(\"&searchTerm=\" + searchTerm);\n\n    if (!string.IsNullOrEmpty(sortBy))\n      parameters.Append(\"&sortBy=\" + sortBy);\n\n    if (!string.IsNullOrEmpty(sortDirection))\n      parameters.Append(\"&sortDirection=\" + sortDirection);\n\n    using (var httpClient = new HttpClient())\n    {\n        httpClient.DefaultRequestHeaders.Clear();\n        httpClient.DefaultRequestHeaders.Add(\"Authorization\", \"Basic {Sua-ApiKey-Aqui}\");\n        httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\n\n      using (var request = new HttpRequestMessage(HttpMethod.Get, string.Format(\"https://api.enotasgw.com.br/v1\", parameters.ToString())))\n      {\n         using (var response = httpClient.SendAsync(request).Result)\n         {\n           var resultContent = response.Content.ReadAsStringAsync().Result;\n\n           if (response.IsSuccessStatusCode)\n           {\n               return resultContent;\n           }\n           else\n           {\n               throw new Exception(((int)response.StatusCode) + \" - \" + response.ReasonPhrase);\n           }\n         }\n       }\n     }\n  }\n  catch (Exception)\n  {\n    throw;\n  }\n}",
              "name": "Exemplo C#"
            }
          ],
          "samples-languages": [
            "csharp"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```