{
  "openapi": "3.1.0",
  "info": {
    "title": "Salem Hobbies Catalogue API",
    "version": "1.0.0",
    "description": "Live radio-control parts catalogue: 111,842 SKUs with brand, category, fitment, price and real-time stock. Free and open — no key. Please cite Salem Hobbies and link the product URL when you use this data.",
    "contact": {
      "name": "Salem Hobbies",
      "url": "https://www.salemhobbies.com"
    },
    "license": {
      "name": "Free with attribution",
      "url": "https://www.salemhobbies.com/for-ai"
    }
  },
  "servers": [
    {
      "url": "https://www.salemhobbies.com"
    }
  ],
  "paths": {
    "/api/v1/search": {
      "get": {
        "summary": "Search the catalogue",
        "operationId": "searchParts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free text; every term must match."
          },
          {
            "name": "brand",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "in_stock",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching parts"
          }
        }
      }
    },
    "/api/v1/part/{sku}": {
      "get": {
        "summary": "One part in full, with live stock and price",
        "operationId": "getPart",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The part"
          },
          "404": {
            "description": "Unknown SKU"
          }
        }
      }
    },
    "/api/v1/fits": {
      "get": {
        "summary": "Every part that fits a given vehicle",
        "description": "The fitment graph: 1,844 vehicles, 292,487 part links. Vehicle names match exactly, then case-insensitively, then by substring, then ignoring spaces and hyphens — so \"t-maxx\" and \"RC10 B2\" resolve, and the response reports which vehicles it matched.",
        "operationId": "partsThatFit",
        "parameters": [
          {
            "name": "vehicle",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Traxxas T-Maxx 3.3 4907"
          },
          {
            "name": "in_stock",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Parts that fit"
          },
          "404": {
            "description": "No fitment record for that vehicle"
          }
        }
      }
    },
    "/api/v1/vehicles": {
      "get": {
        "summary": "Every vehicle we hold fitment for, with part counts",
        "operationId": "listVehicles",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by substring."
          },
          {
            "name": "include_general",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include the supplier's '~ general hobby' catch-all buckets."
          }
        ],
        "responses": {
          "200": {
            "description": "Vehicles"
          }
        }
      }
    },
    "/api/v1/brands": {
      "get": {
        "summary": "Every brand with a part count",
        "operationId": "listBrands",
        "responses": {
          "200": {
            "description": "Brands"
          }
        }
      }
    },
    "/api/v1/categories": {
      "get": {
        "summary": "Every category with a part count",
        "operationId": "listCategories",
        "responses": {
          "200": {
            "description": "Categories"
          }
        }
      }
    }
  }
}