openapi: 3.0.3
info:
  title: World Signals
  version: "1.0"
  description: Daily cross-country snapshot of attention. One call per table; filter by country, language, kind or free text.
servers:
  - url: https://signals.yohaku.city
paths:
  /v1/tables:
    get:
      summary: List tables with today's row counts
      responses:
        "200": {description: OK}
  /v1/dates:
    get:
      summary: Available snapshot dates
      responses:
        "200": {description: OK}
  /v1/search_trends:
    get:
      summary: Rising searches per country with approximate traffic and the driving headline
      description: "Source: Google Trends daily RSS. Filters: country, q."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: country, in: query, schema: {type: string}}
        - {name: q, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
  /v1/podcast_charts:
    get:
      summary: Top-100 podcasts per country
      description: "Source: Apple Podcasts marketing RSS. Filters: country, q."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: country, in: query, schema: {type: string}}
        - {name: q, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
  /v1/gdelt_events:
    get:
      summary: World events of the last hour counted by country x CAMEO root code, with mean Goldstein scale
      description: "Source: GDELT 2.0 event export. Filters: country_fips, cameo_root."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: country_fips, in: query, schema: {type: string}}
        - {name: cameo_root, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
  /v1/github_new_repos:
    get:
      summary: Repositories created in the last 7 days with the most stars
      description: "Source: GitHub search API. Filters: language, q."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: language, in: query, schema: {type: string}}
        - {name: q, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
  /v1/hf_trending:
    get:
      summary: Trending models and datasets on Hugging Face
      description: "Source: Hugging Face Hub API. Filters: kind, pipeline, q."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: kind, in: query, schema: {type: string}}
        - {name: pipeline, in: query, schema: {type: string}}
        - {name: q, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
  /v1/steam_top:
    get:
      summary: Most played games by peak concurrent players
      description: "Source: Steam charts API. Filters: q."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: q, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
  /v1/package_downloads:
    get:
      summary: npm packages by keyword and top PyPI packages with download counts
      description: "Source: npm registry, hugovk/top-pypi-packages. Filters: ecosystem, q."
      parameters:
        - {name: date, in: query, schema: {type: string}, description: "YYYY-MM-DD (default latest)"}
        - {name: limit, in: query, schema: {type: integer}, description: "rows to return"}
        - {name: ecosystem, in: query, schema: {type: string}}
        - {name: q, in: query, schema: {type: string}}
      responses:
        "200": {description: OK}
