API Source
Theapi source type polls any HTTP endpoint on a configurable interval, diffs the response against previously stored state in SQLite, and emits only the changes as standard pipeline messages. Any request/response API becomes a real-time event stream — no webhooks, no changes to the upstream system, no event infrastructure required.
Quick Start
Poll an OpenWeatherMap endpoint every 30 seconds and emit changes:url, interval, and key_path. Everything else has a sensible default.
Config Reference
Source-Level Fields
api Block Fields
Core
Watermark Block
Controls incremental polling — how the source avoids re-fetching data it has already seen.Pagination Block
Watermark Strategies
- none
- timestamp
- cursor
- etag
Full-scan on every poll. Diffs against stored state. Simple and correct for any API.Best for: small result sets, APIs with no filtering support.
Pagination Strategies
- link_header
- cursor
- offset
Follows RFC 8288
Link headers with rel="next".Best for: GitHub, GitLab, standards-compliant REST APIs.Change Detection Modes
diff (default)
Field-level comparison. Emits records annotated with _change metadata:
hash
SHA-256 hash of the full payload. If the hash changes, the record is emitted. No field-level metadata. Lower CPU overhead for large payloads.
Cookbook Examples
GitHub Pull Requests
Poll open PRs withLink header pagination and ETag caching:
Stripe Charges
Cursor-based pagination and watermark:Jira Issues
Timestamp watermark with offset pagination:Operational Guidance
Choosing a Poll Interval
Rate Limiting
LiteJoin handles rate limiting automatically:429 Too Many Requests— retried withRetry-Afterheader delayX-RateLimit-Remaining: 0— pauses until reset- 5xx errors — retried with exponential backoff (max 3 retries)
- 4xx errors (except 429) — not retried (configuration problem)
Environment Variables
Header values and URLs support${ENV_VAR} expansion: