Barème Kilométrique — impots.gouv.fr
Pricing
Pay per usage
Go to Apify Store
Barème Kilométrique — impots.gouv.fr
Scrapes official French mileage allowance rates (barème kilométrique) from impots.gouv.fr and returns structured JSON data per fiscal power category.
Barème Kilométrique — impots.gouv.fr Scraper
An Apify Actor that retrieves the official French mileage allowance rates (barème kilométrique) published annually by the French tax authority on impots.gouv.fr.
These rates are used to calculate tax-deductible reimbursements for employees who use their personal vehicle for professional purposes (Article 83 of the French General Tax Code).
Output
The Actor pushes one item to the default dataset with the following structure:
{"annee": 2025,"source": "https://www.impots.gouv.fr/...","scrape_date": "2025-04-01","scrape_method": "live","categories": [{"categorie": "Voitures","bareme": [{"puissance_fiscale": "3 CV et moins","tranches": [{ "km_de": 0, "km_a": 5000, "taux": 0.529 },{ "km_de": 5001, "km_a": 20000, "formule": "d × 0.316 + 1065" },{ "km_de": 20001, "km_a": null, "taux": 0.370 }]},{ "puissance_fiscale": "4 CV", "tranches": [ ... ] },{ "puissance_fiscale": "5 CV", "tranches": [ ... ] },{ "puissance_fiscale": "6 CV", "tranches": [ ... ] },{ "puissance_fiscale": "7 CV et plus", "tranches": [ ... ] }]},{"categorie": "Motos (cylindrée > 50 cm³)","bareme": [ ... ]},{"categorie": "Cyclomoteurs (cylindrée ≤ 50 cm³)","bareme": [ ... ]}]}
Tranche fields
| Field | Type | Description |
|---|---|---|
km_de | integer | Lower bound of the distance bracket (inclusive) |
km_a | integer | null | Upper bound (inclusive). null means "and above" |
taux | float | Flat rate in €/km (first and last brackets) |
formule | string | Formula string for the middle bracket, where d = total km driven |
scrape_method values
| Value | Meaning |
|---|---|
live | Tables were successfully parsed from the live website |
official_fallback | Site structure changed or was unreachable; hardcoded official data was used |
Input
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
annee | integer | No | Current year | Tax year (e.g. 2025). Supported range: 2020–2030. |
Example input
{ "annee": 2025 }
How it works
- Fetch the relevant impots.gouv.fr page using
got-scrapingwith realistic browser headers. - Parse all
<table>elements with Cheerio, filtering for ones that mention fiscal power (CV) values. - Structure the parsed rows into the JSON schema above.
- Fallback — if the live page can't be parsed (layout changes, network error), the Actor returns hardcoded official data for the requested year and sets
scrape_method: "official_fallback".
Running locally
# Install dependenciesnpm install# Run with default input (current year)npm start# Run with a specific yearecho '{"annee": 2024}' > storage/key_value_stores/default/INPUT.jsonnpm start
Requires Node.js 18+.
Limitations
- impots.gouv.fr occasionally restructures its pages; the live scraper may revert to
official_fallbackif the DOM changes significantly. - Only car (voiture), motorcycle (moto), and moped (cyclomoteur) rates are covered. Electric-vehicle supplements are not included separately.
- This Actor is informational only. Always verify rates against the official government source before filing taxes.
License
Apache-2.0