{
  "openapi": "3.1.0",
  "info": {
    "title": "PJELLY Deals API",
    "version": "1.0.0",
    "description": "Free, honest crypto guidance and scam protection from PeanutButterJelly.io. No login, no passwords. Affiliate links; net commissions support student scholarships and hunger relief."
  },
  "servers": [
    {
      "url": "https://www.peanutbutterjelly.io/api"
    }
  ],
  "paths": {
    "/search": {
      "get": {
        "operationId": "search_deals",
        "summary": "Search deals",
        "description": "Search crypto exchange and hardware wallet offers by keyword. Same as the MCP tool search_deals.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keywords, e.g. 'beginner exchange'",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Optional filter",
            "schema": {
              "type": "string",
              "enum": [
                "exchange",
                "hardware_wallet"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON answer. Includes affiliate disclosure, risk warning and guide links where applicable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unknown id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/deal/{id}": {
      "get": {
        "operationId": "get_deal",
        "summary": "Get deal",
        "description": "Full record for one offer. Same as get_deal.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Offer id, e.g. ledger-flex",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON answer. Includes affiliate disclosure, risk warning and guide links where applicable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unknown id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/guide/{topic}": {
      "get": {
        "operationId": "get_buying_guide",
        "summary": "Get buying guide",
        "description": "Plain-text guide summary. Same as get_buying_guide.",
        "parameters": [
          {
            "name": "topic",
            "in": "path",
            "required": true,
            "description": "Guide topic",
            "schema": {
              "type": "string",
              "enum": [
                "crypto_exchange",
                "cold_wallet"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON answer. Includes affiliate disclosure, risk warning and guide links where applicable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unknown id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/check-site": {
      "get": {
        "operationId": "check_wallet_site",
        "summary": "Check wallet site",
        "description": "Checks whether a web address (or a sentence containing one) is an official Ledger or Coinbase site. Address check only.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Web address or sentence",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON answer. Includes affiliate disclosure, risk warning and guide links where applicable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unknown id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/compare": {
      "get": {
        "operationId": "compare_deals",
        "summary": "Compare deals",
        "description": "Side-by-side comparison of 2 to 4 offers using only facts from our guides.",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "description": "Comma-separated offer ids, e.g. ledger-nano-gen5,ledger-flex",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON answer. Includes affiliate disclosure, risk warning and guide links where applicable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unknown id",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}