Barème Kilométrique — impots.gouv.fr avatar

Barème Kilométrique — impots.gouv.fr

Pricing

Pay per usage

Go to Apify Store
Barème Kilométrique — impots.gouv.fr

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.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

sylvain

sylvain

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

13 days ago

Last modified

Categories

Share

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

FieldTypeDescription
km_deintegerLower bound of the distance bracket (inclusive)
km_ainteger | nullUpper bound (inclusive). null means "and above"
tauxfloatFlat rate in €/km (first and last brackets)
formulestringFormula string for the middle bracket, where d = total km driven

scrape_method values

ValueMeaning
liveTables were successfully parsed from the live website
official_fallbackSite structure changed or was unreachable; hardcoded official data was used

Input

ParameterTypeRequiredDefaultDescription
anneeintegerNoCurrent yearTax year (e.g. 2025). Supported range: 2020–2030.

Example input

{ "annee": 2025 }

How it works

  1. Fetch the relevant impots.gouv.fr page using got-scraping with realistic browser headers.
  2. Parse all <table> elements with Cheerio, filtering for ones that mention fiscal power (CV) values.
  3. Structure the parsed rows into the JSON schema above.
  4. 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 dependencies
npm install
# Run with default input (current year)
npm start
# Run with a specific year
echo '{"annee": 2024}' > storage/key_value_stores/default/INPUT.json
npm start

Requires Node.js 18+.


Limitations

  • impots.gouv.fr occasionally restructures its pages; the live scraper may revert to official_fallback if 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