当前位置: 首页 > Skill >

Firehose Web Monitor

Firehose Web Monitor

2.0.2 2026.11.17 浏览:475
获取Skill文件查看使用说明
作者:江澄许可证:
本文目录展开

Firehose API

Firehose monitors the web in real time. You create rules (Lucene queries) on a tap, and every crawled page that matches a rule is delivered to that tap over a Server-Sent Events stream. (URL Watch — tracking a fixed list of pages for changes — is a separate product; see the docs index at the end.)

This file covers the common Stream API tasks inline so you can act without fetching. For the full Lucene field semantics, the complete category/type label lists, the validate contract, URL Watch, and billing, follow the links under Documentation at the end — that section is generated from the live docs, so it never goes stale.

Authentication

Base URL: https://api.firehose.com. Bearer token, two kinds (both issued from the Firehose dashboard):

  • Management key (fhm_ prefix) — create, list, update, and delete taps. Cannot manage rules or stream.
  • Tap token (fh_ prefix) — manage the rules on one tap and open its stream.
Authorization: Bearer fh_your_tap_token

Endpoints

Tap management — management key:

Method Path Purpose
GET /v1/taps List taps; response includes each tap's token
POST /v1/taps Create a tap (returns its token)
GET PUT DELETE /v1/taps/:id Get, rename, pause/resume, or delete a tap

To pause a tap PUT /v1/taps/:id with {"status":"paused"}; resume with {"status":"active"}. A paused tap keeps its rules but matches nothing and streams no updates; resuming re-arms every rule and can return 422 if it would exceed your plan's active-tap limit.

Deleting a tap is permanent: it immediately revokes the tap's token and deletes every rule on it. Confirm with the user before deleting a tap — if the tap only needs to stop temporarily, pause it.

Rules & streaming — tap token:

Method Path Purpose
GET /v1/rules List the tap's rules
POST /v1/rules Create a rule
GET PUT DELETE /v1/rules/:id Get, update, or delete a rule
POST /v1/validate Validate a query before saving (/v1/validate/public: no auth)
GET /v1/stream Open the SSE stream of matching pages

Deleting a rule is permanent and its matches stop immediately. Confirm with the user before deleting rules.

Rules & queries

A rule object has: value (Lucene query, required), tag (label, optional, ≤255 chars), nsfw (bool, default false), and quality (bool, default true — drops pagination, tag/category, and stale pages).

Queries use Lucene ClassicQueryParser. The default field is added (text from inserted diff chunks). Key fields:

  • Text (tokenized, case-insensitive): added, removed, added_anchor, removed_anchor, title
  • Keyword (exact, case-sensitive): url, domain, publish_time, page_category, page_type, language
  • Number (range queries): dr — Ahrefs Domain Rating 0–100
  • Filter: recent:<n>h|<n>d|<n>mo — only pages published within the window

Operators: AND OR NOT, "exact phrases", and on url/domain wildcards (* ?) and regex (/.../) — escape / as / (and \/ in JSON). Example queries:

tesla AND language:en
title:tesla AND page_category:"/News" AND recent:24h
domain:techcrunch.com AND NOT url:*/tag/*

Streaming (SSE)

GET /v1/stream emits four event types: connected (open), update (a match), error, and end (timeout/limit reached — reconnect to continue). An update's data is { tap_id, query_id, matched_at, document }, where document carries url, title, publish_time, diff.chunks[] ({ typ: "ins"|"del", text }), page_category[], page_types[], language, domain_rating, and markdown. Null/empty fields are omitted.

Examples

# Create a tap (management key) — the response contains the new tap token
curl -s -X POST -H "Authorization: Bearer $FIREHOSE_MANAGEMENT_KEY" 
  -H "Content-Type: application/json" -d '{"name":"Brand Mentions"}' 
  https://api.firehose.com/v1/taps

# Create a rule, then list the tap's rules (tap token)
curl -s -X POST -H "Authorization: Bearer $FIREHOSE_TAP_TOKEN" 
  -H "Content-Type: application/json" -d '{"value":"ahrefs OR semrush","tag":"seo"}' 
  https://api.firehose.com/v1/rules
curl -s -H "Authorization: Bearer $FIREHOSE_TAP_TOKEN" https://api.firehose.com/v1/rules

# Open the match stream (keep the connection open)
curl -N -H "Authorization: Bearer $FIREHOSE_TAP_TOKEN" https://api.firehose.com/v1/stream

Rate limits & errors

/v1/rules — 60 requests/min per tap. /v1/stream — 30 connections/min per tap. Errors: 401 invalid/missing token, 403 resource not in your org, 404 not found, 422 validation error, 429 rate limit exceeded.

Documentation

The full documentation. Each link is the page's raw Markdown — append .md to any page URL. Read the relevant page for anything not covered above.

Get started

  • Introduction: What Firehose is, who it's for, and how the real-time pipeline turns your rules into a live stream of matching web pages — plus where to go next.
  • Quickstart: Go from zero to a live stream of matching web pages in about five minutes — get a management key, create a tap, add a rule, then open the stream.
  • Core concepts: The objects you work with in Firehose — organizations, taps, rules, matches, keys, and URL Watch — and how each one relates to the others.
  • Stream vs URL Watch: Firehose monitors the web two ways — Stream matches the whole crawl against your rules, URL Watch tracks a fixed list of pages. Pick the right one.
  • Authentication: How management keys (fhm_) and tap tokens (fh_) differ, what each one authorizes, the API base URL, and how to pass them as a bearer token on requests.

Stream

  • Stream overview: The core Firehose product — your rules match every crawled page and matches are delivered over a live SSE stream. When to use it, and how a match is made.
  • Rules & query syntax: Create, read, update, and delete the queries attached to a tap — and the full query language they're written in.
  • Streaming (SSE): Open the Server-Sent Events connection, pass the right query parameters, handle each event type, and reconnect cleanly without missing matches.
  • Match payload: Every field on an update event and the page document it delivers, with an example payload and the full list of category and type labels to match on.

URL Watch

  • URL Watch overview: Track a specific list of URLs for changes on a schedule and capture the diff between crawls. When to use URL Watch over the Stream, and how it works.
  • Creating watches: Add a single URL to watch, choose how often it's crawled, preview the render, check its status, and bulk-import many URLs at once from a list.
  • Diffs & crawl history: Read what changed between two crawls of a watched URL, including the added and removed content, and work through the recorded crawl history.
  • Quotas & limits: Monthly check quotas, watched-URL caps, and the fastest crawl frequency allowed on each plan — and how Firehose behaves when a watch hits a limit.

Dashboard

  • The live feed: Watch matches arrive in real time in the dashboard, review them as they stream in, then save the ones that matter and export your selection for later.
  • Filters & domain lists: Reusable query fragments and domain/URL lists you attach to taps to shape what they match — plus AI query generation.

Organizations & Access

  • Taps: Taps are the API tokens (fh_) that own a set of rules and that you stream from. Why to keep one tap per use case, and how to create and manage them.
  • Management keys: Organization-scoped credentials (fhm_) for creating and managing taps programmatically — how to create one, what it unlocks, and when to use it.

Billing

  • Plans & pricing: The Firehose subscription tiers from Free to Business plus the API-only plan — what each one includes, its quotas, and who it's the right fit for.
  • How billing works: How prepaid credit, per-match metering, and monthly grants fit together — what counts as a billable match, what doesn't, and how the quotas relate.

API reference

  • Management-key endpoints: List, create, fetch, update, and revoke taps over HTTP with an organization management key (fhm_), with the request and response shape for each call.
  • URL Watch endpoints: List, create, update, and delete URL Watch subscriptions and read their crawl diffs over HTTP, authenticated with an organization management key (fhm_).
  • Tap-token endpoints: Create, read, update, and delete rules and open the SSE match stream with a tap token (fh_) — endpoint reference, parameters, and the tap's rate limits.
  • Validate a query: Check a Lucene query against query-core before saving it as a rule — validity, diagnostics, and the compiled query, with an unauthenticated public variant for try-it pages.
  • Errors & limits: Every HTTP status code the API returns, the per-endpoint and stream rate limits, and the error events the SSE stream sends before it closes.
  • Code examples: End-to-end snippets for taps, rules, streaming, and URL Watch in curl, JavaScript, and Python — copy, paste, and adapt them to your own keys.

Troubleshooting

  • Why am I not getting matches?: The usual reasons a stream or feed stays empty — crawl coverage, url: filters, the quality filter, the recency window, a too-strict query, or no credit.
  • Stream disconnects or errors: Why a stream closes or returns 401, 402, or 429, why it can seem to skip events, and how to recover from each — including after a dropped connection.

Resources

  • Using Firehose with AI agents: Feed these docs and the Firehose API to an LLM or coding agent using per-page Markdown, the whole-site llms.txt files, and the installable API skill.

The whole documentation in one file: llms-full.txt.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • Firehose API
    • Authentication
    • Endpoints
    • Rules & queries
    • Streaming (SSE)
    • Examples
    • Rate limits & errors
    • Documentation
      • Get started
      • Stream
      • URL Watch
      • Dashboard
      • Organizations & Access
      • Billing
      • API reference
      • Troubleshooting
      • Resources
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期