{
  "openapi": "3.1.0",
  "info": {
    "title": "浩瀚信源采集 API",
    "version": "1.0.0",
    "summary": "多通道采集公开内容：RSS 订阅、资讯站列表页、公开资讯接口，自动按「账号+标题」去重",
    "description": "多通道采集公开内容：RSS 订阅、资讯站列表页、公开资讯接口，自动按「账号+标题」去重 免费额度申请制开通，申请入口：https://skyaibi.com/developer.html",
    "contact": {
      "name": "浩瀚数据晟财（北京）科技有限公司",
      "url": "https://skyaibi.com/"
    }
  },
  "servers": [
    {
      "url": "https://skyaibi.com",
      "description": "生产环境"
    }
  ],
  "tags": [
    {
      "name": "sources",
      "description": "浩瀚信源采集 API"
    }
  ],
  "paths": {
    "/v1/sources/fetch": {
      "post": {
        "tags": [
          "sources"
        ],
        "summary": "多通道采集公开内容：RSS 订阅、资讯站列表页、公开资讯接口，自动按「账号+标题」去重",
        "operationId": "sources_fetch",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sources": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "channel": {
                          "type": "string",
                          "enum": [
                            "rss",
                            "zhibo8",
                            "dongqiudi"
                          ]
                        },
                        "url": {
                          "type": "string"
                        },
                        "account": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "channel",
                        "url"
                      ]
                    }
                  },
                  "hours": {
                    "type": "integer",
                    "default": 48,
                    "minimum": 1,
                    "maximum": 720
                  },
                  "limit_per_source": {
                    "type": "integer",
                    "default": 30,
                    "minimum": 1,
                    "maximum": 200
                  },
                  "dedupe": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "sources"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 0
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              },
                              "summary": {
                                "type": "string"
                              },
                              "published": {
                                "type": "string"
                              },
                              "source_id": {
                                "type": "string"
                              },
                              "account": {
                                "type": "string"
                              },
                              "fingerprint": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "stats": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "errors": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "40001 无效 API Key"
          },
          "429": {
            "description": "触发限频"
          }
        }
      },
      "get": {
        "tags": [
          "sources"
        ],
        "summary": "查询结果 / 获取元数据",
        "operationId": "sources_fetch_get",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "申请后由系统下发"
      }
    }
  }
}