{"openapi":"3.0.3","info":{"title":"Gains API","version":"1.0.0","description":"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."},"servers":[{"url":"https://www.tuning-database.co.uk/api/v1/gains"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"paths":{"/types":{"get":{"summary":"Vehicle types","description":"Every vehicle type in the catalogue with the number of models under each.","parameters":[{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":[{"type":"car","models":1027},{"type":"truck","models":101}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/makes":{"get":{"summary":"Manufacturers","description":"Every manufacturer, or only those with a matching model when a filter is given.","parameters":[{"name":"type","in":"query","required":false,"description":"Only makes or models of one vehicle type: car, truck, tractor, marine, motorcycle, industrial.","schema":{"type":"string"}},{"name":"body","in":"query","required":false,"description":"Only vans (body=van) or pickups (body=pickup). A make is included when at least one of its models matches.","schema":{"type":"string"}},{"name":"motorhome_base","in":"query","required":false,"description":"Pass 1 to keep only the chassis campers are built on.","schema":{"type":"string"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":[{"id":10236,"name":"BMW","slug":"bmw","category":null,"logo":"https://www.tuning-database.co.uk/wp-content/uploads/gains-api/assets/logos/bmw-light.svg","logo_dark":"https://www.tuning-database.co.uk/wp-content/uploads/gains-api/assets/logos/bmw-dark.svg"}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/makes/{makeId}/models":{"get":{"summary":"Models of a manufacturer","description":"The models under one manufacturer. makeId 0 means every manufacturer, which is how \"all camper bases\" is asked in one call.","parameters":[{"name":"makeId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"type","in":"query","required":false,"description":"Only makes or models of one vehicle type: car, truck, tractor, marine, motorcycle, industrial.","schema":{"type":"string"}},{"name":"body","in":"query","required":false,"description":"Only vans (body=van) or pickups (body=pickup). A make is included when at least one of its models matches.","schema":{"type":"string"}},{"name":"motorhome_base","in":"query","required":false,"description":"Pass 1 to keep only the chassis campers are built on.","schema":{"type":"string"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":[{"id":9491,"name":"M2","slug":"m2","vehicle_type":"car","body_type":null,"motorhome_base":false,"photo":"https://www.tuning-database.co.uk/wp-content/uploads/gains-api/assets/photos/bmw_m2.jpg"}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/models/{modelId}/generations":{"get":{"summary":"Generations of a model","description":"The generations under one model, newest first. year_to is null while a generation is still in production.","parameters":[{"name":"modelId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":[{"id":9651,"name":"F87","year_from":"2015","year_to":"2021","platform_code":null,"photo":"https://www.tuning-database.co.uk/wp-content/uploads/gains-api/assets/photos/bmw_m2_f87.jpg"}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/generations/{generationId}/engines":{"get":{"summary":"Engines of a generation","description":"Every engine under one generation, each in the same shape as the single-engine call. Pass verified=1 to keep only entries that carry a factory identity and contradict nothing.","parameters":[{"name":"generationId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}},{"name":"verified","in":"query","required":false,"description":"Pass 1 to return only entries whose verified flag is true.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"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}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/engines/{engineId}":{"get":{"summary":"One engine","description":"Stock and stage figures for one engine, with optional groups under ?include=.","parameters":[{"name":"engineId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"include","in":"query","required":false,"description":"Comma-separated optional groups: specs, ecu, dyno, photo, gearbox. ecu adds the ECU block (ECU name, read methods, read tools, work methods, options, units); dyno adds the normalised curves for stock and each stage; specs adds the spec sheet; gearbox adds the gearbox controller, launch control, and an explicit statement of what is not held; photo adds a picture url.","schema":{"type":"string"}},{"name":"generation","in":"query","required":false,"description":"One engine can sit under several generations. Pass the generation id you came from and the vehicle block names it; a generation it does not sit under is a 404.","schema":{"type":"string"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"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}},"examples":{"with_include":{"summary":"With ?include=specs,ecu,dyno,photo,gearbox","value":{"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"}}}}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/engine/{engineId}":{"get":{"summary":"One engine (alias)","description":"The same as /engines/{engineId}. Kept because several embedded widgets still send the singular.","parameters":[{"name":"engineId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"include","in":"query","required":false,"description":"Comma-separated optional groups: specs, ecu, dyno, photo, gearbox. ecu adds the ECU block (ECU name, read methods, read tools, work methods, options, units); dyno adds the normalised curves for stock and each stage; specs adds the spec sheet; gearbox adds the gearbox controller, launch control, and an explicit statement of what is not held; photo adds a picture url.","schema":{"type":"string"}},{"name":"generation","in":"query","required":false,"description":"One engine can sit under several generations. Pass the generation id you came from and the vehicle block names it; a generation it does not sit under is a 404.","schema":{"type":"string"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"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}}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/coverage":{"get":{"summary":"Coverage, every make","description":"How much the catalogue holds per manufacturer: models, generations and engine placements. Counts only, never a figure. Use it to check whole makes before launch instead of finding thin entries one car at a time.","parameters":[{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":[{"id":10236,"name":"BMW","models":26,"generations":118,"engines":1179}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/makes/{makeId}/coverage":{"get":{"summary":"Coverage, one make in depth","description":"Every model under the manufacturer, every generation under each, how many engines it holds, and years_known - false where the catalogue could not date the generation (typically a single \"All Years\" entry). That flag is the honest signal of a thin entry.","parameters":[{"name":"makeId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":{"make":{"id":10236,"name":"BMW"},"models":[{"id":9491,"name":"M2","generations":[{"id":10467,"name":"G8X","year_from":"2022","year_to":"2024","engines":1,"years_known":true},{"id":9651,"name":"F87","year_from":"2015","year_to":"2021","engines":6,"years_known":true}]}]}}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}},"/quality":{"get":{"summary":"Entries to check","description":"Where the catalogue contradicts itself: an entry with no engine code, no ECU and no year, sitting under a generation where a fully identified entry of the same displacement lists a different factory figure. One of the two is out, and the thin one is the one to look at. A list to check in one call, not a verdict - two entries can honestly reach the same tuned result from different stock - and no figures are returned. Report what you confirm from My Account; an entry we confirm is withheld from every answer.","parameters":[{"name":"meta","in":"query","required":false,"description":"Pass 1 to add a meta block naming the source, the plan and any filters applied.","schema":{"type":"string"}}],"responses":{"200":{"description":"The answer, always under \"data\".","headers":{"X-Data-Source":{"description":"Where the answer was served from.","schema":{"type":"string"}},"X-Gains-Plan":{"description":"The plan the key is on.","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Calls allowed per minute for this key.","schema":{"type":"integer"}},"X-Gains-Filters":{"description":"Present when a saved preference narrowed or reshaped the answer.","schema":{"type":"string"}}},"content":{"application/json":{"example":{"data":[{"id":27855,"name":"2.0 TSI - R + 320hp 380Nm","generation":9527,"compare_with":{"id":17765,"name":"2.0 TSI R 300hp 380Nm"},"reason":"No engine code, ECU or year, and an identified entry of the same displacement under this generation lists a different factory figure."}]}}}},"401":{"description":"No key, an unknown key, or a revoked one. The body says which.","content":{"application/json":{"example":{"error":"That API key is not recognised."}}}},"404":{"description":"No such resource, or an engine asked for under a generation it does not sit in.","content":{"application/json":{"example":{"error":"No such resource."}}}},"429":{"description":"Past the daily allowance for the plan, or more than the per-minute limit. The body says which and when it clears.","content":{"application/json":{"example":{"error":"More than 300 calls in a minute. The limit clears within sixty seconds."}}}}}}}}}