{
  "openapi": "3.1.0",
  "info": {
    "title": "Crypt0's News API",
    "version": "1.0.0",
    "description": "Machine-readable feeds for Crypt0's News: the Daily Brief article archive, the Bitcoin price history dataset, and network stats. All endpoints are public and read only. The underlying articles are original reporting by Crypt0's News; commercial redistribution, training-data use, and white-label resale require a license. See https://crypt0snews.com/licensing.html for terms.",
    "contact": {
      "url": "https://crypt0snews.com/"
    },
    "license": {
      "name": "All rights reserved; license required for commercial use",
      "url": "https://crypt0snews.com/licensing.html"
    }
  },
  "servers": [
    {
      "url": "https://crypt0snews.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/news.json": {
      "get": {
        "summary": "Daily Brief feed (news.json)",
        "description": "Latest 50 Daily Brief articles across all categories.",
        "operationId": "get_news_feed",
        "responses": {
          "200": {
            "description": "Versioned article feed envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "version",
                    "generated_at",
                    "count",
                    "articles"
                  ],
                  "properties": {
                    "version": {
                      "type": "string",
                      "example": "v1"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "published": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "url",
                          "published",
                          "category",
                          "summary"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/crypto.json": {
      "get": {
        "summary": "Daily Brief feed (crypto.json)",
        "description": "Latest Daily Brief articles tagged Crypto or Finance.",
        "operationId": "get_crypto_feed",
        "responses": {
          "200": {
            "description": "Versioned article feed envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "version",
                    "generated_at",
                    "count",
                    "articles"
                  ],
                  "properties": {
                    "version": {
                      "type": "string",
                      "example": "v1"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "published": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "url",
                          "published",
                          "category",
                          "summary"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/ai.json": {
      "get": {
        "summary": "Daily Brief feed (ai.json)",
        "description": "Latest Daily Brief articles tagged AI or Tech.",
        "operationId": "get_ai_feed",
        "responses": {
          "200": {
            "description": "Versioned article feed envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "version",
                    "generated_at",
                    "count",
                    "articles"
                  ],
                  "properties": {
                    "version": {
                      "type": "string",
                      "example": "v1"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "published": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "url",
                          "published",
                          "category",
                          "summary"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gaming.json": {
      "get": {
        "summary": "Daily Brief feed (gaming.json)",
        "description": "Latest Daily Brief articles tagged Gaming.",
        "operationId": "get_gaming_feed",
        "responses": {
          "200": {
            "description": "Versioned article feed envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "version",
                    "generated_at",
                    "count",
                    "articles"
                  ],
                  "properties": {
                    "version": {
                      "type": "string",
                      "example": "v1"
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "source": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "published": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "url",
                          "published",
                          "category",
                          "summary"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/articles.json": {
      "get": {
        "summary": "Full article archive",
        "description": "Every Daily Brief article ever published, newest first, with full text paragraphs and source links.",
        "operationId": "get_article_archive",
        "responses": {
          "200": {
            "description": "Archive envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "date": {
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          },
                          "byline": {
                            "type": "string"
                          },
                          "seq": {
                            "type": "integer"
                          },
                          "paragraphs": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "sources": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "label",
                                "url"
                              ]
                            }
                          },
                          "slug": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "title",
                          "date",
                          "tag",
                          "byline",
                          "seq",
                          "paragraphs",
                          "sources",
                          "slug"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/btc-price-data.json": {
      "get": {
        "summary": "Bitcoin price history dataset",
        "description": "Daily BTC closes from 2009 plus 55 dated history markers. daily entries are [unix_ms, usd_close] pairs.",
        "operationId": "get_btc_price_history",
        "responses": {
          "200": {
            "description": "Price history dataset.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "monthly": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      }
                    },
                    "daily": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      }
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "desc": {
                            "type": "string"
                          },
                          "price": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "date",
                          "title",
                          "desc",
                          "price"
                        ]
                      }
                    }
                  },
                  "required": [
                    "updated",
                    "source",
                    "monthly",
                    "daily",
                    "events"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/stats-data.json": {
      "get": {
        "summary": "Bitcoin network stats snapshot",
        "description": "Daily refreshed chain facts: block height, issuance, circulation, next halving, all time high.",
        "operationId": "get_network_stats",
        "responses": {
          "200": {
            "description": "Network stats snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "string"
                    },
                    "block_height": {
                      "type": "integer"
                    },
                    "subsidy_btc": {
                      "type": "number"
                    },
                    "circulation_btc": {
                      "type": "number"
                    },
                    "max_supply_btc": {
                      "type": "integer"
                    },
                    "pct_mined": {
                      "type": "number"
                    },
                    "next_halving_block": {
                      "type": "integer"
                    },
                    "blocks_to_halving": {
                      "type": "integer"
                    },
                    "est_halving_date": {
                      "type": "string"
                    },
                    "ath_price": {
                      "type": "number"
                    },
                    "ath_date": {
                      "type": "string"
                    },
                    "days_since_ath": {
                      "type": "integer"
                    },
                    "latest_price": {
                      "type": "number"
                    },
                    "latest_price_date": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "updated",
                    "block_height",
                    "subsidy_btc",
                    "circulation_btc",
                    "max_supply_btc",
                    "pct_mined",
                    "next_halving_block",
                    "blocks_to_halving",
                    "est_halving_date",
                    "ath_price",
                    "ath_date",
                    "days_since_ath",
                    "latest_price",
                    "latest_price_date"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "This OpenAPI specification",
        "description": "The machine-readable description of this API.",
        "operationId": "get_openapi_spec",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}
