openapi: 3.0.3
info:
  title: AirdropBuzz API
  version: "1.1.0"
  description: Public read-only endpoints for AirdropBuzz articles, airdrops, news, and crypto events.
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
  /events.php:
    get:
      summary: List crypto events
      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: q
          schema: { type: string }
        - in: query
          name: status
          schema: { type: string, enum: [all, upcoming, live, ended], default: all }
        - in: query
          name: event_type
          schema: { type: string }
        - in: query
          name: blockchain
          schema: { type: string }
        - in: query
          name: featured
          schema: { type: string, example: "true" }
      responses:
        "200":
          description: OK
  /event_detail.php:
    get:
      summary: Get event by slug or id
      parameters:
        - in: query
          name: slug
          schema: { type: string }
        - in: query
          name: id
          schema: { type: integer }
      responses:
        "200":
          description: OK
  /events_widget.php:
    get:
      summary: Get compact event widgets
      parameters:
        - in: query
          name: mode
          schema: { type: string, enum: [featured_upcoming, live, ending_soon], default: featured_upcoming }
        - in: query
          name: limit
          schema: { type: integer, default: 6, minimum: 1, maximum: 12 }
      responses:
        "200":
          description: OK
