本页面为机器翻译。英文版本为原文,可能更准确或更及时。 查看英文版

丰富型 Webhooks

丰富型 Webhooks 投递经 AI 处理的文章数据,包含公司实体解析、情绪分析以及完整的过滤选项集。


文章模型

丰富型 Webhooks 投递完整的文章负载,包含 AI 生成的公司数据、情绪分析和实体解析。

  • Name
    link
    Type
    string
    Description

    指向完整文章的 URL。

  • Name
    source
    Type
    string
    Description

    来源网站。例如 www.reuters.com

  • Name
    title
    Type
    string
    Description

    文章标题。

  • Name
    summary
    Type
    string
    Description

    文章摘要(如果有)。可为空。

  • Name
    publishDate
    Type
    Date
    Description

    发布日期,采用 ISO 8601 日期字符串格式。

  • Name
    createdAt
    Type
    Date
    Description

    文章在 finlight 系统中的内部创建日期,采用 ISO 8601 日期字符串格式。

  • Name
    revisedDate
    Type
    Date | null
    Description

    文章在首次发布后最后一次修订的日期。当文章从未修订时为 null。当启用 includeUpdates 且文章已被修订时存在。

  • Name
    isUpdate
    Type
    boolean
    Description

    当本次投递由发布后更新触发时为 true。仅在启用 includeUpdates 时存在。

  • Name
    language
    Type
    string
    Description

    ISO 639-1 语言代码。例如 en | de | fr

  • Name
    sentiment
    Type
    string
    Description

    AI 生成的文章情绪。可能的值:positive | negative | neutral

  • Name
    confidence
    Type
    number
    Description

    情绪值的置信度分数,介于 01 之间。

  • Name
    images
    Type
    string[]
    Description

    文章中的图片 URL 数组。

  • Name
    countries
    Type
    string[]
    Description

    ISO 3166-1 alpha-2 格式的国家/地区代码数组。例如 ["US", "GB"]。可为空。

  • Name
    categories
    Type
    string[]
    Description

    文章类别数组。可能的值:markets | economy | business | politics | geopolitics | regulation | technology | energy | commodities | crypto | health | climate | security。可为空。

  • Name
    companies
    Type
    Company[]
    Description

    由 AI 实体匹配解析出的已匹配公司对象数组。每个公司包含以下字段:

    • companyId number —— finlight 内部公司标识符
    • confidence string —— 实体匹配置信度分数
    • name string —— 公司全称
    • ticker string —— 主要股票代码。例如 AAPL
    • exchange string —— 交易所代码。例如 XNAS
    • country string —— 主要上市地所在国家/地区(ISO 3166-1 alpha-2)
    • sector string —— 行业板块分类。例如 Technology
    • industry string —— 细分行业分类
    • isin string —— 主要 ISIN 代码
    • openfigi string —— OpenFIGI 标识符
    • primaryListing object —— { ticker, exchangeCode, exchangeCountry }
    • isins string[] —— 该公司所有已知的 ISIN
    • otherListings object[] —— [{ ticker, exchangeCode, exchangeCountry }]

WEBHOOK投递类型

创建丰富型 Webhook

finlight 控制台中创建 webhook 时,在设置向导的第一步选择 Enriched 作为投递类型。这是默认选项。条件步骤将显示所有可用的过滤参数。

丰富型 Webhooks 仅投递符合您条件的新发布文章。每次投递都是作为 HTTP POST 请求发送到您端点的单篇文章负载。

  • Name
    query
    Type
    string
    Description

    用于查找相关文章的搜索查询。支持布尔运算符和字段级过滤。参见高级查询构建指南。

  • Name
    sources
    Type
    string[]
    Description

    将投递限制为来自特定来源的文章。例如 ["www.reuters.com", "www.cnbc.com"]

  • Name
    excludeSources
    Type
    string[]
    Description

    排除来自特定来源的文章。例如 ["www.example.com"]

  • Name
    language
    Type
    string
    Description

    按文章语言过滤(ISO 639-1)。默认为 en,仅返回英语并排除其他语言 —— 参见语言与覆盖范围

  • Name
    tickers
    Type
    string[]
    Description

    按股票代码过滤。仅投递经 AI 实体解析匹配到这些公司的文章。例如 ["AAPL", "GOOGL", "TSLA"]

  • Name
    countries
    Type
    string[]
    Description

    按国家/地区代码过滤(ISO 3166-1 alpha-2)。仅投递匹配到这些国家/地区公司的文章。例如 ["US", "GB", "DE"]

  • Name
    categories
    Type
    string[]
    Description

    按文章类别过滤。可能的值:markets | economy | business | politics | geopolitics | regulation | technology | energy | commodities | crypto | health | climate | security

  • Name
    includeContent
    Type
    boolean
    Description

    在负载中包含完整的文章正文。需要包含完整文章访问权限的套餐。

  • Name
    includeEntities
    Type
    boolean
    Description

    包含在文章中发现的提取实体(公司、人物、地点)。

  • Name
    excludeEmptyContent
    Type
    boolean
    Description

    仅投递摘要非空的文章。可用于过滤掉低质量文章。

  • Name
    includeUpdates
    Type
    boolean
    Description

    当文章在首次发布后被更新时重新投递。更新后的负载包含 isUpdate=truerevisedDate 时间戳。

Response

{
  "link": "https://www.example.com/article1",
  "source": "www.example.com",
  "title": "Stock Market Hits New Highs",
  "summary": "A brief summary of the article...",
  "publishDate": "2023-10-01T12:34:56Z",
  "createdAt": "2023-10-01T12:35:10Z",
  "language": "en",
  "sentiment": "positive",
  "confidence": 0.95,
  "images": [
    "https://www.example.com/image1.jpg",
    "https://www.example.com/image2.jpg"
  ],
  "countries": ["US"],
  "categories": ["markets", "health"],
  "companies": [
    {
      "companyId": 41494,
      "confidence": "0.9335401058197021",
      "country": "US",
      "exchange": "XNAS",
      "industry": "Biotechnology: Pharmaceutical Preparations",
      "name": "Summit Therapeutics Inc. Common Stock",
      "sector": "Health Care",
      "ticker": "SMMT",
      "isin": "US86627T1088",
      "openfigi": "BBG01PH11VP5",
      "primaryListing": {
        "ticker": "SMMT",
        "exchangeCode": "XNAS",
        "exchangeCountry": "US"
      },
      "isins": ["US86627T1088", "US86627T2088"],
      "otherListings": [
        {
          "ticker": "SMMT.L",
          "exchangeCode": "XLON",
          "exchangeCountry": "GB"
        }
      ]
    }
  ]
}

Response (includeUpdates: true)

{
  "link": "https://www.example.com/article1",
  "source": "www.example.com",
  "title": "Stock Market Hits New Highs — Updated",
  "summary": "An updated summary of the article...",
  "publishDate": "2023-10-01T12:34:56Z",
  "createdAt": "2023-10-01T12:35:10Z",
  "revisedDate": "2023-10-02T08:00:00Z",
  "isUpdate": true,
  "language": "en",
  "sentiment": "positive",
  "confidence": 0.95,
  "images": [
    "https://www.example.com/image1.jpg"
  ],
  "countries": ["US"],
  "categories": ["markets"],
  "companies": []
}

EXAMPLES组合过滤器

过滤示例

丰富型 Webhooks 支持组合使用所有过滤参数。以下是常见模式:

公司研究源:

tickers: ["AAPL", "GOOGL"]
sources: ["www.reuters.com", "www.bloomberg.com"]
includeEntities: true

突发市场新闻:

query: "earnings OR revenue OR guidance"
categories: ["markets", "economy"]
language: "en"

区域行业聚焦:

countries: ["US", "CA"]
query: "tech OR technology OR semiconductor"
tickers: ["NVDA", "TSMC", "AMD"]

欧洲金融新闻:

countries: ["GB", "DE", "FR"]
sources: ["www.reuters.com", "www.ft.com"]
language: "en"

查询语法支持布尔运算符、带引号的短语和排除:

"Apple earnings"                           simple phrase
(Apple OR iPhone) AND (earnings OR revenue)  boolean groups
Tesla NOT recall                           exclusion

完整的查询语法参考请参见高级查询构建指南。


GUIDE选择帮助

何时使用丰富型 Webhooks

在以下情况选择 Enriched:

  • 需要公司/股票代码级别的过滤(tickerscountriescategories
  • 希望负载中包含情绪分数、置信度值或实体解析
  • 需要通过 includeContent / includeEntities 包含完整文章内容或提取的实体
  • 正在构建股票监控、财报跟踪或特定行业的新闻源

在以下情况选择 Raw:

  • 需要尽可能低的投递延迟
  • 正在构建不需要增强数据的高吞吐量管道
  • 仅需按关键字、来源或语言过滤
  • 希望使用更精简的负载以减少您端的处理开销

有关原始 Webhook 过滤选项的完整详情,请参见原始 Webhooks指南。