Skip to main content

parse_nfse

Parse a Nota Fiscal de Serviço Eletrônica (NFSe) document using AI-powered OCR to extract service invoice information and tax details from Brazilian electronic service invoices. The parser extracts service invoice details including:

  • cnpj_prestador/cnpj_tomador: CNPJ numbers of service provider/recipient
  • razao_social_prestador/razao_social_tomador: Company names
  • valor_liquido_centavos/valor_total_centavos: Net/total amounts in cents
  • numero_nota: Invoice number
  • codigo_servico: Service code number
  • data_emissao: Issue date (YYYY-MM-DD)
  • descricao: Service description
  • endereco_prestador/endereco_tomador: Full addresses
  • bairro_prestador/bairro_tomador: District/neighborhood information
  • cep_prestador/cep_tomador: ZIP codes
  • municipio_prestador: City of service provider
  • uf_prestador/uf_tomador: State abbreviations (e.g., "SP", "RJ")
  • email_prestador/email_tomador: Email addresses
  • inscricao_municipal_prestador: Municipal registration

Parameters

NameDescriptionTypeDefault
document_path (required)The path to the NFSe document to be parsed. dict: The parsed NFSe data. ValueError: If document path is invalid or parsing fails.Union[Path, str]None

Return Value

abstra_internals.contracts_generated.CloudApiCliModelsNfseResponse