Taxes
The person’s yearly fiscal data and income-tax return, from the Spanish tax agency (AEAT)
Where it lives: in the Spain Public Administration results, at data.tax.individual_yearly. APIs with dedicated per-product results endpoints return this model directly.
One entry per fiscal year: what the Agencia Tributaria holds about the person for that year, read in their name from the AEAT’s own site with their consent.
Two documents, and why both matter
For each year the AEAT keeps two different things, and this model carries both:
The fiscal data is the part a PDF of the return never shows. A return says the person declared mortgage interest; the fiscal data says which bank lent the money, since when, the person’s share of the loan and how much capital they paid back that year. The same goes for income: the return has a total, the fiscal data has every employer and every account behind it.
How many years
The session reads the last closed fiscal years, counting back from last year, as many as last_n_years asks: from 1 to 5, 3 by default. A session opened in 2026 with the default reads 2025, 2024 and 2023.
A year whose fiscal data the AEAT does not publish is left out, and the other years are delivered: a fiscal year’s data usually appears in the spring after it closes.
What a year says
status—submittedwhen the person’s return for that year was filed and processed by the AEAT;datawhen only the fiscal data was found.- Income, by kind: employment (every employer, with gross pay, withholding and social security contributions), economic activities (each with its activity code), interest from every bank account, savings income, and sales of shares and funds.
liabilities.real_estate_loans— every loan linked to a home: the lender, the date it was signed, the person’s participation in it, and the capital and interest paid that year.- Deductions: donations, entity by entity.
- The fiscal address for the year, with the cadastral reference of the main home in
address_reference.
Final tax result (to be paid or refunded)
The breakdown
Income, deductions and liabilities, each with its own detail:
Real estate/rental income details
Personal tax-free allowance
Family tax-free allowances (children, ascendants)
The return, as the AEAT issued it
When the person filed a return for the year, its official PDF travels as an attachment of that year’s entry, attachment:es-aeat-model-100. Its metadata carries the document’s secure verification code (csv-code) and the address at the AEAT’s site where anyone can check it (csv-url): the copy you keep can be proven authentic years later, without asking the person again.