Usage

Copy the code block, replace YOUR_API_KEY with your API key, then process documents quickly.
from abbyy_document_ai import DocumentAi

with DocumentAi(api_key_auth=YOUR_API_KEY) as document_ai:
  res = document_ai.models.utility_bill.begin_field_extraction(input_source={
    "url": "https://example.com/document.pdf",
  })

  assert res.documents is not None
  doc_id = res.documents[0].id

  processed = False
  while not processed:
      time.sleep(3)  # Wait 3 seconds between checks
      res = document_ai.models.utility_bill.get_extracted_fields(
          document_id=doc_id
      )
      processed = res.utility_bill.meta.status == "Processed"

  print(res.utility_bill.fields)

Extracted Fields

Field NameDescription
Service ProviderInformation about the utility company.
  NameThe name of the utility company.
  AddressThe address of the utility company.
  PhoneThe contact phone number of the utility company.
  WebsiteThe website of the utility company.
Customer InformationInformation about the customer.
  Account NumberThe customer’s account number.
  NameThe customer’s name.
  Service AddressThe address where the utility service is provided.
  Billing AddressThe address where the bill is sent.
Billing PeriodInformation about the billing period.
  Start DateThe start date of the billing period.
  End DateThe end date of the billing period.
  Due DateThe date by which payment is due.
Usage InformationInformation about utility usage.
  Current ReadingThe current meter reading.
  Previous ReadingThe previous meter reading.
  UsageThe total usage for the billing period.
  Unit of MeasurementThe unit of measurement for usage (e.g., kWh, therms, gallons).
ChargesInformation about charges and fees.
  Basic Service ChargeThe basic service or connection fee.
  Usage ChargeThe charge for actual utility usage.
  TaxesThe total taxes applied.
  Other ChargesAny additional charges or fees.
  Total AmountThe total amount due.
Payment InformationInformation about payment options.
  Previous BalanceThe balance from the previous bill.
  Payments ReceivedPayments received since the last bill.
  Current ChargesThe current charges for this billing period.
  Total DueThe total amount due including any previous balance.

Supported Languages

CountriesLanguages
GlobalEnglish