{
 "openapi": "3.1.0",
 "info": {
  "title": "repairinfo.app device data",
  "version": "1.0.0",
  "description": "Manufacturer declarations from the EU product database EPREL and the French repairability and durability indices. repairinfo.app does not test devices itself. score is 0 to 10 (higher is better). scoreType says what it is based on: overall_eu_data (smartphones, tablets), repairability_index_fr, durability_index_fr. consumptionScore (0 to 10) rates energy, water and noise of washing machines and dishwashers. url is the device page on repairinfo.app. This interface carries no prices and no affiliate links. Rankings are sorted by score only.",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  },
  "contact": {
   "url": "https://www.repairinfo.app/daten-und-api/"
  }
 },
 "servers": [
  {
   "url": "https://www.repairinfo.app"
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "Optional API key (ri_…) from your repairinfo account; monthly quota by plan, see https://www.repairinfo.app/fuer-entwickler/"
   },
   "apiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key"
   }
  }
 },
 "security": [
  {},
  {
   "bearer": []
  },
  {
   "apiKey": []
  }
 ],
 "paths": {
  "/api/v1/search": {
   "get": {
    "operationId": "search_devices",
    "summary": "Search devices",
    "description": "Search smartphones, tablets, laptops, TVs, washing machines, dishwashers and vacuum cleaners by brand, sales name or model number. Returns repairability and durability score, EU repairability class, guaranteed update years and the link to the device page.",
    "parameters": [
     {
      "name": "query",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Brand, sales name or model number, e.g. \"Galaxy S26\" or \"SM-S942B\""
      },
      "description": "Brand, sales name or model number, e.g. \"Galaxy S26\" or \"SM-S942B\""
     },
     {
      "name": "category",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "enum": [
        "smartphones",
        "tablets",
        "laptops",
        "tvs",
        "washing_machines",
        "dishwashers",
        "vacuum_cleaners"
       ]
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 20,
       "default": 8
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Result with notes on data source",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid parameters"
     },
     "401": {
      "description": "Invalid API key"
     },
     "403": {
      "description": "Plan without API access"
     },
     "429": {
      "description": "Rate limit (60 calls per minute without key) or monthly quota reached"
     }
    }
   }
  },
  "/api/v1/device": {
   "get": {
    "operationId": "get_device",
    "summary": "Device details",
    "description": "All data for one device: score and what it is based on, repairability class and index, guaranteed software update years and the year updates last until at least, user-replaceable battery, battery life, charge cycles, spare-part years, energy class, EPREL registration number, official recalls or safety warnings (EU Safety Gate, RappelConso) if any, and the link to the device page.",
    "parameters": [
     {
      "name": "id",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "Device id from search_devices or top_devices, e.g. smartphones/gigaset-gs6-pro"
      },
      "description": "Device id from search_devices or top_devices, e.g. smartphones/gigaset-gs6-pro"
     }
    ],
    "responses": {
     "200": {
      "description": "Result with notes on data source",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid parameters"
     },
     "401": {
      "description": "Invalid API key"
     },
     "403": {
      "description": "Plan without API access"
     },
     "429": {
      "description": "Rate limit (60 calls per minute without key) or monthly quota reached"
     }
    }
   }
  },
  "/api/v1/top": {
   "get": {
    "operationId": "top_devices",
    "summary": "Best devices in a category",
    "description": "The most repairable and durable devices of a category, sorted by score. Optional filters: minimum guaranteed update years, user-replaceable battery, brand. Use this for questions like \"which phone gets updates the longest\" or \"which tablets have a replaceable battery\".",
    "parameters": [
     {
      "name": "category",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "smartphones",
        "tablets",
        "laptops",
        "tvs",
        "washing_machines",
        "dishwashers",
        "vacuum_cleaners"
       ]
      }
     },
     {
      "name": "min_update_years",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 15
      }
     },
     {
      "name": "replaceable_battery",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "brand",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 20,
       "default": 10
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Result with notes on data source",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid parameters"
     },
     "401": {
      "description": "Invalid API key"
     },
     "403": {
      "description": "Plan without API access"
     },
     "429": {
      "description": "Rate limit (60 calls per minute without key) or monthly quota reached"
     }
    }
   }
  },
  "/api/v1/barcode": {
   "get": {
    "operationId": "lookup_barcode",
    "summary": "Look up a barcode",
    "description": "Find a device by its EAN/GTIN barcode (8 to 14 digits), as printed on the box or shelf label. Returns the same data as get_device.",
    "parameters": [
     {
      "name": "ean",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "description": "EAN-8, UPC-A, EAN-13 or GTIN-14"
      },
      "description": "EAN-8, UPC-A, EAN-13 or GTIN-14"
     }
    ],
    "responses": {
     "200": {
      "description": "Result with notes on data source",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Invalid parameters"
     },
     "401": {
      "description": "Invalid API key"
     },
     "403": {
      "description": "Plan without API access"
     },
     "429": {
      "description": "Rate limit (60 calls per minute without key) or monthly quota reached"
     }
    }
   }
  }
 }
}