openapi: 3.0.3
info:
  title: AirdropBuzz API
  version: "1.0.0"
  description: Public read-only endpoints for AirdropBuzz articles, airdrops, and news.
servers:
  - url: https://airdropbuzz.com/api
paths:
  /ping.php:
    get:
      summary: Health check
      responses:
        "200":
          description: OK
  /articles.php:
    get:
      summary: List articles
      parameters:
        - in: query
          name: page
          schema: { type: integer, default: 1, minimum: 1 }
        - in: query
          name: limit
          schema: { type: integer, default: 20, minimum: 1, maximum: 50 }
        - in: query
          name: sort
          schema: { type: string, enum: [newest, oldest], default: newest }
        - in: query
          name: q
          schema: { type: string }
        - in: query
          name: series_id
          schema: { type: integer }
        - in: query
          name: author
          schema: { type: string }
        - in: query
          name: include
          schema: { type: string, example: "content" }
      responses:
        "200":
          description: OK
  /article.php:
    get:
      summary: Get article by slug or id
      parameters:
        - in: query
          name: slug
          schema: { type: string }
        - in: query
          name: id
          schema: { type: integer }
        - in: query
          name: include
          schema: { type: string, example: "content" }
      responses:
        "200":
          description: OK
  /airdrops.php:
    get:
      summary: List airdrops
      parameters:
        - in: query
          name: page
          schema: { type: integer, default: 1, minimum: 1 }
        - in: query
          name: limit
          schema: { type: integer, default: 20, minimum: 1, maximum: 50 }
        - in: query
          name: sort
          schema: { type: string, enum: [newest, oldest, ending, score], default: newest }
        - in: query
          name: q
          schema: { type: string }
        - in: query
          name: category
          schema: { type: string, example: "Solana,DeFi" }
        - in: query
          name: active
          schema: { type: string, example: "true" }
        - in: query
          name: include
          schema: { type: string, example: "details" }
      responses:
        "200":
          description: OK
  /airdrop-details.php:
    get:
      summary: Get airdrop by slug or id
      parameters:
        - in: query
          name: slug
          schema: { type: string }
        - in: query
          name: id
          schema: { type: integer }
        - in: query
          name: include
          schema: { type: string, example: "details" }
      responses:
        "200":
          description: OK
  /news.php:
    get:
      summary: List news
      parameters:
        - in: query
          name: page
          schema: { type: integer, default: 1, minimum: 1 }
        - in: query
          name: limit
          schema: { type: integer, default: 20, minimum: 1, maximum: 50 }
        - in: query
          name: sort
          schema: { type: string, enum: [newest, oldest], default: newest }
        - in: query
          name: q
          schema: { type: string }
        - in: query
          name: author
          schema: { type: string }
        - in: query
          name: include
          schema: { type: string, example: "content" }
      responses:
        "200":
          description: OK
  /news-article.php:
    get:
      summary: Get news article by slug or id
      parameters:
        - in: query
          name: slug
          schema: { type: string }
        - in: query
          name: id
          schema: { type: integer }
        - in: query
          name: include
          schema: { type: string, example: "content" }
      responses:
        "200":
          description: OK

