Gains API

Vehicle performance catalogue: stock and Stage 1-4 figures, gains, ECU and read-tool detail, normalised dyno curves, body type and camper-base flags, manufacturer logos and model photos. Every response is {"data": ...}. Send your key in the X-API-Key header on every call.

Base url and key

https://www.tuning-database.co.uk/api/v1/gains/

Send the key on every call as a header. Never put it in the url or in a browser page.

X-API-Key: gk_your_key_here

Regenerate the key at any time from My Account. The old key stops immediately; the new one is shown once.

Walking the catalogue

  1. GET /types - the vehicle types and how many models each has.
  2. GET /makes?type=car - the manufacturers. Filters: type=, body=van or body=pickup, motorhome_base=1. A manufacturer is included when at least one of its models matches.
  3. GET /makes/{makeId}/models - the same filters. makeId of 0 means every manufacturer, so "all camper bases" is one call.
  4. GET /models/{modelId}/generations - newest first. year_to is null while a generation is still built.
  5. GET /generations/{generationId}/engines - each engine in the full shape below.
  6. GET /engines/{engineId}?generation={generationId} - one engine. Pass the generation you came from and the vehicle block names it; an engine can sit under several generations.

The engine

original is the stock figure. Each stage carries the tuned figure, the gain and the gain as a percentage; a stage that does not exist is the same object with nulls. mods appears on a stage that needs hardware beyond the software.

{
    "data": {
        "id": 18000,
        "name": "M2 3.0i 370hp",
        "engine_code": "N55B30T0",
        "displacement": "2979",
        "fuel_type": "petrol",
        "vehicle": {
            "make": "BMW",
            "model": "M2",
            "generation": "F87",
            "year_from": "2015",
            "year_to": "2021"
        },
        "original": {
            "hp": 370,
            "nm": 465
        },
        "stage1": {
            "hp": 410,
            "nm": 520,
            "gain_hp": 40,
            "gain_nm": 55,
            "gain_pct": 10.8
        },
        "stage2": {
            "hp": 430,
            "nm": 560,
            "gain_hp": 60,
            "gain_nm": 95,
            "gain_pct": 16.2,
            "mods": "Stage may require additional hardware."
        },
        "stage3": {
            "hp": null,
            "nm": null,
            "gain_hp": null,
            "gain_nm": null,
            "gain_pct": null
        },
        "stage4": {
            "hp": null,
            "nm": null,
            "gain_hp": null,
            "gain_nm": null,
            "gain_pct": null
        },
        "estimated": false,
        "fuel_saving": {
            "combined_percent": null,
            "full_eco_percent": null
        },
        "verified": true,
        "engine_number": null
    }
}

More detail: include=

Add ?include=specs,ecu,dyno,photo,gearbox to the engine call, any subset in any order.

{
    "data": {
        "id": 18000,
        "name": "M2 3.0i 370hp",
        "engine_code": "N55B30T0",
        "displacement": "2979",
        "fuel_type": "petrol",
        "vehicle": {
            "make": "BMW",
            "model": "M2",
            "generation": "F87",
            "year_from": "2015",
            "year_to": "2021"
        },
        "original": {
            "hp": 370,
            "nm": 465
        },
        "stage1": {
            "hp": 410,
            "nm": 520,
            "gain_hp": 40,
            "gain_nm": 55,
            "gain_pct": 10.8
        },
        "stage2": {
            "hp": 430,
            "nm": 560,
            "gain_hp": 60,
            "gain_nm": 95,
            "gain_pct": 16.2,
            "mods": "Stage may require additional hardware."
        },
        "stage3": {
            "hp": null,
            "nm": null,
            "gain_hp": null,
            "gain_nm": null,
            "gain_pct": null
        },
        "stage4": {
            "hp": null,
            "nm": null,
            "gain_hp": null,
            "gain_nm": null,
            "gain_pct": null
        },
        "estimated": false,
        "fuel_saving": {
            "combined_percent": null,
            "full_eco_percent": null
        },
        "verified": true,
        "engine_number": null,
        "specs": {
            "Engine & performance": [
                {
                    "label": "Manufacturer",
                    "value": "BMW"
                },
                {
                    "label": "Range / model",
                    "value": "M2"
                },
                {
                    "label": "Generation",
                    "value": "F87"
                },
                {
                    "label": "Engine code",
                    "value": "N55B30T0"
                },
                {
                    "label": "Engine type",
                    "value": "Turbo Petrol"
                },
                {
                    "label": "Fuel",
                    "value": "Petrol"
                },
                {
                    "label": "Cylinders",
                    "value": "6"
                },
                {
                    "label": "Capacity (cc)",
                    "value": "2979"
                },
                {
                    "label": "Power",
                    "value": "370 hp"
                },
                {
                    "label": "Torque",
                    "value": "465 Nm"
                }
            ]
        },
        "ecu": {
            "ecu": "MEVD17.2.G",
            "read_tools": [
                "Autotuner",
                "Alientech KESS3"
            ],
            "work_methods": [
                "OBD",
                "Bench"
            ],
            "options": [
                "DTC",
                "Vmax",
                "Pop & bang"
            ],
            "read_methods": [
                "OBD",
                "Bench"
            ],
            "units": [
                {
                    "manufacturer": "Bosch",
                    "name": "MEVD17.2.G",
                    "protocol": null,
                    "is_tcu": false
                },
                {
                    "manufacturer": "Temic",
                    "name": "DQ381",
                    "protocol": null,
                    "is_tcu": true
                }
            ]
        },
        "dyno": {
            "measured": null,
            "shape": {
                "hp": [
                    0.2,
                    0.45,
                    0.7,
                    0.9,
                    1,
                    0.95
                ],
                "nm": [
                    0.5,
                    0.85,
                    1,
                    0.95,
                    0.85,
                    0.7
                ],
                "rpm": [
                    2000,
                    3000,
                    4000,
                    5000,
                    6000,
                    7000
                ]
            },
            "stages": {
                "stage1": {
                    "hp": [
                        0.25,
                        0.5,
                        0.75,
                        0.92,
                        1,
                        0.94
                    ],
                    "nm": [
                        0.55,
                        0.9,
                        1,
                        0.95,
                        0.85,
                        0.72
                    ],
                    "rpm": [
                        2000,
                        3000,
                        4000,
                        5000,
                        6000,
                        7000
                    ]
                }
            }
        },
        "gearbox": {
            "unit": {
                "name": "DQ381",
                "manufacturer": "Temic"
            },
            "status": "known",
            "status_note": "The gearbox controller the catalogue lists for this engine.",
            "launch_control": "not_listed",
            "figures": null,
            "figures_status": "not_held",
            "figures_note": "The catalogue holds no confirmed gearbox tuning figures - no torque limit, no shift times. Nothing is estimated here."
        },
        "photo": "https://www.tuning-database.co.uk/wp-content/uploads/gains-api/assets/photos/bmw_m2_f87.jpg"
    }
}

Checking coverage before you launch

This is a tuning catalogue: it is deep where vehicles are commonly remapped and thin where they are not. Rather than finding a thin entry one car at a time, check whole manufacturers in one call.

Both return counts only, never a figure.

Report a vehicle we do not carry

The catalogue is a tuning catalogue: it is deep where vehicles are commonly remapped and thin where they are not. When you need one it does not hold, send it from My Account - one vehicle per line, in your own words:

Honda Airwave (petrol): Gen 1 (2005-2010) 1.5 VTEC 110hp

Whatever can be read is filled in for you and the line is kept as you wrote it. Each one is listed back on that page with its status, so you can see what happened to it without asking.

The engine code, and the number stamped next to it

Manufacturers stamp two things on an engine: the code, which identifies the design and is shared by every unit of it, and a serial, which identifies that one motor. VW stamps CJXC 124692 on the block; PSA stamps 10JBHA 3099308. The upstream catalogue records them glued together, and on some entries it records the serial with no code at all.

engine_code now carries the code alone, so it matches what you can look up, and the serial is returned separately as engine_number. Nothing is discarded and nothing is invented - the two halves are simply told apart. Where the field held only a serial, or the words "NOT KNOWN", engine_code is null: those never identified anything, and while they sat in that field they made the entry read as verified.

"engine_code": "CJXC",
"engine_number": "124692"

Showing only what is confirmed

Every engine carries verified. It is true when the entry holds a factory identity - the engine code, or the ECU the catalogue names for it - and nothing in it contradicts itself. It is false when nothing confirms the figures.

False is not the same as false figures. Roughly a third of the catalogue carries no identity: those are real cars whose numbers simply are not confirmed by anything we hold. Which of the two you put in front of your own customers is your decision, so we never filter on your behalf - but the switch is there:

GET /generations/9527/engines?verified=1

An identified entry that contradicts itself is false too: an engine code is not a licence to ignore a name that disagrees with its own figures.

Some entries are corrected against the manufacturer specification: where the catalogue disagreed with itself we looked the vehicle up, recorded the published figure and the source it came from, and serve that instead. A corrected entry reads as verified, because a figure checked against the manufacturer is confirmed by something stronger than a code the catalogue happened to carry. We do not invent figures - an entry we cannot settle stays flagged, and one we confirm is wrong is withheld entirely.

Entries to check, in bulk

GET /quality runs every engine in the catalogue against itself and returns what it finds, each row naming the rule that caught it and a confidence:

It returns no figures. Report the ones you confirm from My Account, quoting the entry id first on the line:

27855 - stock is wrong, no Golf VII R is 320hp. 17765 has the right figures.

An entry we confirm is withheld: it disappears from every list and asking for it directly returns 404, so it cannot be rendered by mistake. We do not rewrite a figure we cannot verify - withholding is the honest half of that.

The gearbox

?include=gearbox adds a group of its own:

The gearbox controller also remains inside ecu.units[] with is_tcu: true, where it has always been.

Pictures

Manufacturers carrylogo and logo_dark; models and generations carry photo. All are full urls under https://www.tuning-database.co.uk/wp-content/uploads/gains-api/assets/. Null means there is no picture.

Headers on every answer

Refusals

Every refusal is JSON with an error that says why. 401 - no key, unknown key, or revoked key. 404 - no such resource, or an engine asked for under a generation it does not sit in. 429 - past the daily allowance for the plan, or more than the per-minute limit; the message says which and when it clears.

Your preferences

Settings saved in My Account apply to every call the key makes: which vehicle types come back, kW and lb-ft beside hp and Nm, grouping by type or make, which stages to include. With nothing set, the answers are exactly as documented here.

The machine-readable version

OpenAPI 3.0 document - generated from the same code that serves these calls.