Discover/nfce.fazenda.sp.gov.br API
live

nfce.fazenda.sp.gov.br APIwww.nfce.fazenda.sp.gov.br

Retrieve structured data from São Paulo state NFC-e fiscal receipts via the get_receipt endpoint. Returns store info, itemized purchases, totals, and payment methods.

Endpoint health
verified 58m ago
get_receipt
1/1 passing latest checkself-healing
Endpoints
1
Updated
2h ago
Try it
The 'p' parameter from the NFC-e QR code URL. Format: 44-digit access key followed by pipe-separated fields (e.g. '35260147508411092689651270000202991072525880|3|1').
api.parse.bot/scraper/ebd36a87-7ee2-4562-9f4a-ee681fd8aa55/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/ebd36a87-7ee2-4562-9f4a-ee681fd8aa55/get_receipt?access_key=35260147508411092689651270000202991072525880%7C3%7C1' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace nfce-fazenda-sp-gov-br-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: NFC-e SP Receipt API — fetch and inspect a Brazilian electronic receipt."""
from parse_apis.NFC_e_SP_Receipt_API import NfceSP, NotFoundError

client = NfceSP()

# Fetch a receipt by its QR code access key
receipt = client.receipts.get(
    access_key="35260147508411092689651270000202991072525880|3|1"
)

# Inspect store info
print(f"Store: {receipt.store.name} (CNPJ: {receipt.store.cnpj})")
print(f"Address: {receipt.store.address}")

# List all items with per-item cost
for item in receipt.items:
    print(f"  {item.name} - Qty: {item.quantity} x {item.unit_price} = {item.total_price}")

# Summary: total items, total spent, payment method
print(f"Item count: {receipt.item_count}")
print(f"Total spent: R$ {receipt.total_spent}")
for pm in receipt.payment_methods:
    print(f"Payment: {pm.method} — R$ {pm.amount}")

# Typed error handling for invalid access keys
try:
    client.receipts.get(access_key="00000000000000000000000000000000000000000000|1|1")
except NotFoundError as exc:
    print(f"Receipt not found: {exc}")

print("exercised: receipts.get / store fields / items iteration / payment_methods / error handling")
All endpoints · 1 totalmissing one? ·

Retrieve a parsed NFC-e receipt by its QR code access key parameter. Returns structured data including store info, itemized purchases with per-item cost, total item count, total amount spent, and payment method. The access_key is the 'p' parameter from the NFC-e QR code URL (typically a 44-digit access key followed by pipe-separated version and type codes).

Input
ParamTypeDescription
access_keyrequiredstringThe 'p' parameter from the NFC-e QR code URL. Format: 44-digit access key followed by pipe-separated fields (e.g. '35260147508411092689651270000202991072525880|3|1').
Response
{
  "type": "object",
  "fields": {
    "items": "array of purchased items with name, code, quantity, unit, unit_price, and total_price",
    "store": "object containing store name, cnpj, and address",
    "access_key": "string with formatted 44-digit access key",
    "item_count": "string with total number of items",
    "total_spent": "string with total amount in BRL (e.g. '18,68')",
    "emission_date": "string with date/time of emission",
    "invoice_number": "string",
    "invoice_series": "string",
    "payment_methods": "array of payment methods with method name and amount",
    "authorization_protocol": "string with authorization protocol number and timestamp"
  },
  "sample": {
    "data": {
      "items": [
        {
          "code": "5113095",
          "name": "ACUCAR CRISTALCUC 1K",
          "unit": "UN",
          "quantity": "1",
          "unit_price": "4,19",
          "total_price": "4,19"
        },
        {
          "code": "357852",
          "name": "ARROZ TIO JOAO T1 2K",
          "unit": "UN",
          "quantity": "1",
          "unit_price": "14,49",
          "total_price": "14,49"
        }
      ],
      "store": {
        "cnpj": "47.508.411/0926-89",
        "name": "CIA BRASILEIRA DE DISTRIBUICAO",
        "address": "Rua Passeio dos Flamboyants , 000200 , , Parque Faber , SAO CARLOS , SP"
      },
      "access_key": "3526 0147 5084 1109 2689 6512 7000 0202 9910 7252 5880",
      "item_count": "2",
      "total_spent": "18,68",
      "emission_date": "25/01/2026 16:45:27",
      "invoice_number": "20299",
      "invoice_series": "127",
      "payment_methods": [
        {
          "amount": "18,68",
          "method": "Cartão de Débito"
        }
      ],
      "authorization_protocol": "135260570093072 25/01/2026 16:45:28"
    },
    "status": "success"
  }
}

About the nfce.fazenda.sp.gov.br API

The nfce.fazenda.sp.gov.br API exposes 1 endpoint — get_receipt — that returns 10 structured fields from São Paulo state electronic consumer fiscal notes (NFC-e), including itemized product lines, store identity, payment methods, and authorization metadata. Pass the access_key parameter extracted from any NFC-e QR code URL to retrieve a fully parsed receipt without manual HTML interpretation.

What the API Returns

The get_receipt endpoint accepts an access_key string — the p parameter found in NFC-e QR code URLs, formatted as a 44-digit fiscal access key followed by pipe-separated control fields. The response includes a store object with the establishment's name, CNPJ (Brazilian tax registration number), and address, alongside emission_date, invoice_number, invoice_series, and authorization_protocol for document traceability.

Itemized Purchase Data

The items array is the core of the response. Each element contains the product name, product code, quantity, unit of measure, unit_price, and total_price — giving you line-level detail for every product on the receipt. item_count summarizes the total number of line items, and total_spent gives the receipt grand total in BRL formatted as a Brazilian decimal string (e.g. '18,68').

Payment Details

The payment_methods array lists each payment instrument used on the transaction along with the amount charged to that method. Receipts paid with multiple methods — such as a split between credit card and cash — will have multiple entries in this array.

Coverage Scope

This API covers public NFC-e documents issued within São Paulo state (SP) and accessible via the state's public consultation portal. The access key must correspond to a valid, already-authorized NFC-e document. Documents that have been cancelled or are pending authorization may not return full data.

Reliability & maintenanceVerified

The nfce.fazenda.sp.gov.br API is a managed, monitored endpoint for www.nfce.fazenda.sp.gov.br — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when www.nfce.fazenda.sp.gov.br changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official www.nfce.fazenda.sp.gov.br API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
58m ago
Latest check
1/1 endpoint passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Automate expense reporting by parsing NFC-e QR codes scanned from paper receipts into structured line items.
  • Verify supplier invoices by cross-checking cnpj, invoice_number, and total_spent against purchase orders.
  • Build personal finance apps that categorize grocery spending from itemized items arrays.
  • Audit reimbursement claims by extracting authorization_protocol and emission_date from employee receipts.
  • Aggregate retail purchase data from São Paulo consumers for market research using product name and unit_price fields.
  • Validate fiscal compliance by confirming authorization_protocol presence on submitted NFC-e documents.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does nfce.fazenda.sp.gov.br offer an official developer API?+
No. The São Paulo state NFC-e system provides a public web consultation interface for individual lookups, but Fazenda SP does not publish a documented REST or XML developer API for programmatic NFC-e data retrieval.
What exactly does get_receipt return for the items on a receipt?+
The items array returns one object per line item, each with name, code, quantity, unit, unit_price, and total_price. It does not aggregate by category — every distinct product line appears separately as recorded on the fiscal document.
Does the API cover NFC-e receipts from states other than São Paulo?+
Not currently. The API is scoped to the São Paulo state public consultation system (nfce.fazenda.sp.gov.br). Receipts issued in other Brazilian states — such as Rio de Janeiro or Minas Gerais — each have their own state portals and are not covered. You can fork this API on Parse and revise it to target another state's NFC-e consultation endpoint.
Does the response include tax breakdown per item or per receipt?+
Not currently. The response exposes purchase totals and line-item prices but does not include a per-item or per-receipt tax breakdown (e.g. ICMS, PIS, COFINS). Those fields appear on some NFC-e documents. You can fork this API on Parse and revise it to add tax field extraction.
What happens if the access_key corresponds to a cancelled or invalid NFC-e document?+
The access key must correspond to a valid, authorized NFC-e on the São Paulo system. Cancelled, inaccessible, or incorrectly formatted keys will not return a populated response. Always use the full p parameter value from the QR code URL, including the pipe-separated suffix fields, to ensure the key is correctly formed.
Page content last updated . Spec covers 1 endpoint from www.nfce.fazenda.sp.gov.br.
Related APIs in Government PublicSee all →
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
sec.gov API
Search for publicly traded companies and instantly access their SEC filings with details like filing type, date, description, and accession numbers. Find the regulatory documents you need to research company financial information and compliance records.
usaspending.gov API
usaspending.gov API
companieshouse.gov.uk API
Search for UK companies and officers, then access detailed information including company profiles, filing history, charges, and officers with significant control. Get comprehensive corporate records and appointment details all in one place.
mars.nasa.gov API
Explore real-time images, weather data, and location tracking from NASA's Perseverance and Curiosity rovers on Mars, while discovering mission details, rock sample findings, and the latest news from the Mars Exploration Program. Access rover photos, scientific discoveries, and multimedia content to stay updated on current Mars exploration activities.
find-and-update.company-information.service.gov.uk API
Search and access detailed information about UK companies registered at Companies House, including company profiles, filing histories, officers, and financial charges. Filter companies by name, status, type, SIC code, and more.
capitol.texas.gov API
Search and monitor Texas Legislature bills, track their progress through legislative stages, and retrieve detailed action histories. Look up legislator contact information, district details, committee assignments, and full committee membership rosters.
statutes.capitol.texas.gov API
Search and navigate Texas statutes and constitutional law with full-text lookup capabilities across codes, chapters, and individual sections. Quickly retrieve complete statute text for any Texas law you need to reference or study.