{
  "openapi": "3.1.0",
  "info": {
    "title": "AI Tools Pick API",
    "version": "1.0.0",
    "description": "Read-only REST API for the AI Tools Pick directory. All responses are JSON. Unknown tool ids return 404."
  },
  "servers": [
    {
      "url": "https://ai-tools-pick.com"
    }
  ],
  "paths": {
    "/api/tools": {
      "get": {
        "summary": "List/filter tools",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "free",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "task",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "capability tag"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "free-text keyword"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of tool records, sorted by pick_score desc",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "cursor"
                      },
                      "name": {
                        "type": "string",
                        "example": "Cursor"
                      },
                      "category": {
                        "type": "string",
                        "example": "Coding"
                      },
                      "description": {
                        "type": "string"
                      },
                      "pricing_tier": {
                        "type": "string",
                        "enum": [
                          "free",
                          "freemium",
                          "paid",
                          "free trial"
                        ]
                      },
                      "pricing_from_usd": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "example": 20
                      },
                      "pricing_detail": {
                        "type": "string"
                      },
                      "capabilities": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "code-gen",
                          "chat"
                        ]
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "affiliate_url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "logo_url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "pick_score": {
                        "type": "number",
                        "example": 88
                      },
                      "pick_reason": {
                        "type": "string"
                      },
                      "best_for": {
                        "type": "string"
                      },
                      "not_for": {
                        "type": "string"
                      },
                      "pros": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "cons": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "rating": {
                        "type": "number",
                        "example": 4.4
                      },
                      "featured": {
                        "type": "boolean"
                      },
                      "updated_at": {
                        "type": "string",
                        "example": "2026-09-25"
                      },
                      "lang": {
                        "type": "string",
                        "example": "en"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "category",
                      "description"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/picks": {
      "get": {
        "summary": "Editor-featured tools",
        "responses": {
          "200": {
            "description": "Featured tool records (featured=true)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "cursor"
                      },
                      "name": {
                        "type": "string",
                        "example": "Cursor"
                      },
                      "category": {
                        "type": "string",
                        "example": "Coding"
                      },
                      "description": {
                        "type": "string"
                      },
                      "pricing_tier": {
                        "type": "string",
                        "enum": [
                          "free",
                          "freemium",
                          "paid",
                          "free trial"
                        ]
                      },
                      "pricing_from_usd": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "example": 20
                      },
                      "pricing_detail": {
                        "type": "string"
                      },
                      "capabilities": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "code-gen",
                          "chat"
                        ]
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "affiliate_url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "logo_url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "pick_score": {
                        "type": "number",
                        "example": 88
                      },
                      "pick_reason": {
                        "type": "string"
                      },
                      "best_for": {
                        "type": "string"
                      },
                      "not_for": {
                        "type": "string"
                      },
                      "pros": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "cons": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "rating": {
                        "type": "number",
                        "example": 4.4
                      },
                      "featured": {
                        "type": "boolean"
                      },
                      "updated_at": {
                        "type": "string",
                        "example": "2026-09-25"
                      },
                      "lang": {
                        "type": "string",
                        "example": "en"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "category",
                      "description"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tool/{id}": {
      "get": {
        "summary": "Single tool by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "cursor"
                    },
                    "name": {
                      "type": "string",
                      "example": "Cursor"
                    },
                    "category": {
                      "type": "string",
                      "example": "Coding"
                    },
                    "description": {
                      "type": "string"
                    },
                    "pricing_tier": {
                      "type": "string",
                      "enum": [
                        "free",
                        "freemium",
                        "paid",
                        "free trial"
                      ]
                    },
                    "pricing_from_usd": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "example": 20
                    },
                    "pricing_detail": {
                      "type": "string"
                    },
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "code-gen",
                        "chat"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "affiliate_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "logo_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pick_score": {
                      "type": "number",
                      "example": 88
                    },
                    "pick_reason": {
                      "type": "string"
                    },
                    "best_for": {
                      "type": "string"
                    },
                    "not_for": {
                      "type": "string"
                    },
                    "pros": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "cons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "rating": {
                      "type": "number",
                      "example": 4.4
                    },
                    "featured": {
                      "type": "boolean"
                    },
                    "updated_at": {
                      "type": "string",
                      "example": "2026-09-25"
                    },
                    "lang": {
                      "type": "string",
                      "example": "en"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "category",
                    "description"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Tool not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}