Liigu sisu juurde

Raha, ettevõtted ja riigi vara

Maksu- ja Tolliameti avalikud päringud

Ettevõtte maksuvõla ja viitenumbri avalik kontroll EMTA enda päringuvormidest.

Maksu- ja Tolliameti avalikud päringuvormid (apps.emta.ee) vastavad kahele küsimusele: mis on ettevõtte või inimese viitenumber ja kas tal on praegu maksuvõlga. Vastus kannab oma ajatemplit ja käib selle hetke kohta: võla puudumine praegu ei tähenda, et võlga kunagi ei olnud. Deklaratsioone ega muid maksuandmeid need vormid ei näita.

Mida su agent peab oskama

KOODVajab käivitatavat koodi. Vähemalt üks samm nõuab koodi käivitamist: seansiküpsis, turvamärgise vahetus, PDF-i või ZIP-i lahtipakkimine, või vastus, mis on mudeli konteksti jaoks liiga suur.

Milline agent selle läbi teeb

Juhend ise

Inglise keeles, sest seda loeb mudel.

Tax Public Inquiries

Use this source for a person's or entity's public EMTA reference number or current tax-arrears result. It does not expose confidential tax filings or bulk tax records.

Vetted module (use this first)

emta.mjs ships in https://kodanikukratt.ee/kratt-agent.tar.gz (plain ESM, Node 22+) and is re-verified against the live source. It performs the session-cookie + CSRF handshake that a plain POST fails ("403 Bad or missing CSRF value"):

import { show } from "./kratt.mjs";
import { taxDebt } from "./emta.mjs";

const r = await taxDebt("12417834"); // registry or personal code — obtained from a source, never guessed
show({ ok: r.ok, at: r.retrievedAt });
show(r.text);
  • taxDebt(code) returns {ok, personCode, text, retrievedAt}. Report the arrears status and the identifier ONLY from text, quoting its timestamp; if ok is false or text is empty, say the check failed rather than asserting a status.
  • Also exported: referenceNumber(code).
  • A no-arrears result is point-in-time, not proof arrears never existed.
  • For a company whose registry code you do not have, resolve it first with findCompany() from ariregister.mjs — never guess an 8-digit code.
  • Minimise personal-data queries: use a personal identifier only when the task requires it.

The contract below is the fallback if a module call throws.

Endpoints

InquiryForm GETForm POST
Reference numberhttps://apps.emta.ee/saqu/public/reference?lang=enhttps://apps.emta.ee/saqu/public/reference/query
Tax arrearshttps://apps.emta.ee/saqu/public/taxdebt?lang=enhttps://apps.emta.ee/saqu/public/taxdebt/query

Request contract

  1. Create a cookie-preserving HTTP session and GET the selected form.
  2. Extract the hidden CSRFToken value.
  3. POST application/x-www-form-urlencoded data to the matching query URL using the same session:
    • personCode: Estonian personal identification code or registry code
    • p_submit: Search
    • CSRFToken: token from the form
  4. Parse the returned HTML table or result paragraph. The tax-arrears response includes its effective timestamp.

No CAPTCHA was present in the verified public flow. If the service later introduces one, stop automation instead of bypassing it.

Output and limits

  • Plain requests cannot run this lookup. The form hands out a session cookie and a hidden token that the query POST has to send straight back, so an agent that can only fetch URLs gets the form's refusal instead of a result — that is our limit, not a statement about the person's arrears, and it must be reported that way.
  • Keep the queried identifier, endpoint, retrieval time, and exact returned fields or message.
  • Minimize personal-data queries: use a personal identifier only when the task requires it and the user is entitled to perform the public lookup.
  • A no-arrears response is a point-in-time result, not proof that arrears never existed.

Verification

Registry code 70000349 returns the public EMTA entity name in both forms and reference number 01000012 in the reference-number result.

Module API

taxDebt(regCodeOrPersonCode) -> {ok, source, personCode, text, retrievedAt}