temsor-api
v0.4.0
Published
Turkish address & e-invoice parsing, IBAN and e-mail validation, EU VAT (VIES), sanctions screening, business days and FX history — one API key.
Downloads
567
Maintainers
Readme
temsor-api
Typed client for the https://api.temsor.com API catalogue — Turkish address and e-invoice parsing, IBAN and e-mail validation, EU VAT lookups, sanctions screening, business-day maths and exchange-rate history. One key covers every endpoint.
npm install temsor-apiimport Client from 'temsor-api';
const api = new Client({ apiKey: process.env.TEMSOR_API_KEY });
const address = await api.trAddressParse({
address: 'Caferağa Mah. Moda Cd. No:12/5 K:3 34710 Kadıköy/İstanbul'
});
console.log(address.district, address.province, address.confidence);
// Kadıköy İstanbul 1
console.log(address.$meta);
// { credits: 1, cached: false, requestId: '…', durationMs: 2 }No key? Every endpoint works without one on a narrow per-IP demo quota, so you can try before signing up.
What you get back
Every result carries a $meta receipt: credits charged, whether it came from cache
(cache hits cost nothing) and the request id. Quote that id if anything looks wrong.
Errors throw ApiError with status, code, details and requestId.
The client retries only on rate limiting and server errors, with backoff — a 400 is
never retried, because it will not change.
Catalogue
| Method | What it does | Credits |
|---|---|---|
| emailVerify | Checks an e-mail address: syntax, whether the domain can actually receive mail, disposable and role-account detection, and typo correction. | 1 |
| euVatValidate | Validates an EU VAT number against the official VIES register, with per-country format checks and honest handling of upstream outages. | 2 |
| ibanValidate | Validates an IBAN from any of 70+ countries: checksum, country length and in-country account structure, and resolves the bank and branch codes. | 1 |
| phoneValidate | Validates and normalises a phone number to E.164, classifies the line type, and resolves the province for Turkish landlines. | 1 |
| sanctionsScreen | Screens a name against the US OFAC, UN Security Council and EU consolidated sanctions lists with transliteration-aware fuzzy matching. | 5 |
| seriesHistory | Returns the accumulated history of public data series with change statistics and a source receipt for every point. | 2 |
| shippingIdentify | Identifies which carrier a tracking number belongs to, validates it where a checksum exists, and returns the canonical tracking link. | 1 |
| trAddressParse | Splits a free-form Turkish address into neighbourhood, street, building, floor, flat, district, province and postcode. | 1 |
| trBusinessDays | Adds business days or counts them between two dates, accounting for Turkish public and religious holidays including half-day eves. | 1 |
| trInvoiceParse | Turns a UBL-TR e-Invoice or e-Archive XML document into clean JSON: parties, line items, taxes and totals. | 3 |
| trMoneyToWords | Writes a monetary amount out in Turkish words, the way invoices, cheques and promissory notes require. | 1 |
| trValidate | Validates Turkish national ID, tax number, IBAN, licence plate, IMEI and barcodes from one endpoint, with type auto-detection. | 1 |
Plans
| Plan | Price | Credits / month | Rate | |---|---|---|---| | Free | free | 2,000 | 2/s | | Starter | $19/mo | 50,000 | 10/s | | Pro | $79/mo | 300,000 | 30/s | | Scale | $299/mo | 2,000,000 | 100/s |
Docs: https://api.temsor.com/docs · OpenAPI: https://api.temsor.com/openapi.json · MCP: https://api.temsor.com/mcp/manifest
This package is generated from the live API registry, so it cannot drift out of sync with the service.
