{
 "openapi": "3.1.0",
 "info": {
  "title": "OpenRobotKits read-only API",
  "version": "1.0.0",
  "description": "Price, stock, license and build facts for open-source robot kits. Prices and stock are read from each seller page once a day, around 9 AM Bangkok (2 AM UTC). No key needed. Please send a descriptive User-Agent. Same data is available over MCP at https://openrobotkits.com/mcp."
 },
 "servers": [
  {
   "url": "https://openrobotkits.com"
  }
 ],
 "paths": {
  "/api/robots.json": {
   "get": {
    "operationId": "listRobots",
    "summary": "All robots with lowest in-stock price, stock state and license",
    "responses": {
     "200": {
      "description": "The robot list",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/RobotList"
        }
       }
      }
     }
    }
   }
  },
  "/api/robots/{slug}.json": {
   "get": {
    "operationId": "getRobot",
    "summary": "One robot with every offer, cost line and sourced fact",
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "so-101",
        "reachy-mini",
        "microduck",
        "phospho-junior",
        "hopejr",
        "rx1",
        "berkeley-humanoid-lite",
        "asimov-v1",
        "parol6",
        "bcn3d-moveo",
        "stringman"
       ]
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The robot",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Robot"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "RobotSummary": {
    "type": "object",
    "required": [
     "slug",
     "name",
     "type",
     "stock_state",
     "page_url"
    ],
    "properties": {
     "slug": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "maker": {
      "type": [
       "string",
       "null"
      ]
     },
     "type": {
      "type": "string"
     },
     "type_label": {
      "type": "string"
     },
     "tagline": {
      "type": "string"
     },
     "license": {
      "type": [
       "string",
       "null"
      ]
     },
     "difficulty": {
      "type": [
       "object",
       "null"
      ],
      "properties": {
       "level": {
        "type": "integer"
       },
       "label": {
        "type": "string"
       }
      }
     },
     "stock_state": {
      "type": "string",
      "enum": [
       "in_stock",
       "out_of_stock",
       "check_site",
       "diy_parts"
      ]
     },
     "lowest_in_stock_price": {
      "type": [
       "number",
       "null"
      ]
     },
     "currency": {
      "type": [
       "string",
       "null"
      ]
     },
     "lowest_in_stock_offer": {
      "type": [
       "object",
       "null"
      ]
     },
     "page_url": {
      "type": "string",
      "format": "uri"
     },
     "api_url": {
      "type": "string",
      "format": "uri"
     },
     "checked_at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     }
    }
   },
   "RobotList": {
    "type": "object",
    "properties": {
     "generated_at": {
      "type": "string",
      "format": "date-time"
     },
     "count": {
      "type": "integer"
     },
     "freshness": {
      "type": "string"
     },
     "note": {
      "type": "string"
     },
     "robots": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/RobotSummary"
      }
     }
    }
   },
   "Offer": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "seller": {
      "type": "string"
     },
     "product": {
      "type": "string"
     },
     "variant": {
      "type": [
       "string",
       "null"
      ]
     },
     "part_only": {
      "type": "boolean"
     },
     "price": {
      "type": [
       "number",
       "null"
      ]
     },
     "currency": {
      "type": "string"
     },
     "stock": {
      "type": "string",
      "enum": [
       "in_stock",
       "out_of_stock",
       "unknown"
      ]
     },
     "in_stock": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "buy_url": {
      "type": "string",
      "format": "uri"
     },
     "seller_url": {
      "type": "string",
      "format": "uri"
     },
     "price_source_url": {
      "type": "string",
      "format": "uri"
     },
     "checked": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     }
    }
   },
   "Robot": {
    "allOf": [
     {
      "$ref": "#/components/schemas/RobotSummary"
     },
     {
      "type": "object",
      "properties": {
       "what_it_is": {
        "type": "string"
       },
       "can_do": {
        "type": "array",
        "items": {
         "type": "string"
        }
       },
       "build_time": {
        "type": [
         "object",
         "null"
        ]
       },
       "license_source": {
        "type": [
         "string",
         "null"
        ]
       },
       "motors": {
        "type": [
         "object",
         "null"
        ]
       },
       "links": {
        "type": "object"
       },
       "cost_breakdown": {
        "type": "array",
        "items": {
         "type": "object"
        }
       },
       "cost_total_note": {
        "type": [
         "string",
         "null"
        ]
       },
       "offers": {
        "type": "array",
        "items": {
         "$ref": "#/components/schemas/Offer"
        }
       },
       "photos": {
        "type": "array",
        "items": {
         "type": "object"
        }
       },
       "videos": {
        "type": "array",
        "items": {
         "type": "object"
        }
       },
       "facts": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "label": {
           "type": "string"
          },
          "value": {
           "type": "string"
          },
          "source": {
           "type": "string",
           "format": "uri"
          },
          "checked": {
           "type": "string",
           "format": "date"
          }
         }
        }
       },
       "freshness": {
        "type": "string"
       }
      }
     }
    ]
   }
  }
 }
}