The Sync API enables Kagi News to keep user settings and article read history consistent across multiple devices. All requests are proxied server-side toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/kagisearch/kite-public/llms.txt
Use this file to discover all available pages before exploring further.
https://kite.kagi.com/api/sync, so the app’s origin is used for every call — your session cookie travels with each request automatically. These are the same internal endpoints used by the official Kagi News frontend; developers building custom front-ends can use them to interoperate with the same sync infrastructure.
Custom front-ends should implement the same sync protocol to interoperate seamlessly with the official Kagi News clients. Specifically: push settings changes via
POST /api/sync, pull remote state on startup via GET /api/sync, and record individual article reads via POST /api/sync/read-history-changes.Settings Sync
GET /api/sync
Fetch the current user’s synced settings from the server. The app calls this on startup (and after re-gaining network connectivity) to pull any changes made on other devices. The response contains an array of RemoteSetting objects alongside a list of any SyncConflict entries that the server resolved on the caller’s behalf.
Authentication: Required (Kagi session cookie)
Array of synced settings. Each entry represents one persisted key/value pair.
Settings that had concurrent modifications across devices. The server applies a merge strategy and includes the resolved value here.
ISO 8601 timestamp that clients should persist as
lastSyncedAt to anchor subsequent delta syncs.POST /api/sync
Push local settings changes to the server. The request body should include the device identifier, the last known sync timestamp, and the list of changed settings. The server performs a three-way merge and returns the authoritative post-merge state (same SyncResponse shape as GET /api/sync).
Authentication: Required (Kagi session cookie)
A stable, unique identifier for the device or browser instance. Used by the server to detect same-device conflicts. Generate once and persist in
localStorage.ISO 8601 timestamp of the previous successful sync, or
null for a first-time push. Allows the server to perform an optimistic merge rather than a full overwrite.Array of settings changes to push. Each entry describes one key whose value has changed since
lastSyncedAt.Settings Export
GET /api/sync/export
Export all of the current user’s synced settings as a downloadable JSON file. Useful for backup purposes or migrating settings to a self-hosted Kagi News instance.
Authentication: Required (Kagi session cookie)
The response is delivered with a Content-Disposition: attachment header. The body is a JSON document containing the complete settings state at the time of export.
Clear Sync Data
POST /api/sync/clear
Delete all synced settings for the current user. This is a destructive, irreversible operation that wipes the server-side state. The local localStorage copy is unaffected — only the remote copy is removed.
Authentication: Required (Kagi session cookie)
Read History
Read history is managed separately from settings. The app uses a change-log model: each read is recorded as an immutableadd or delete operation, enabling efficient incremental (delta) sync rather than transferring the full history on every request.
GET /api/sync/read-history
Fetch the user’s complete article read history from the server.
Authentication: Required (Kagi session cookie)
POST /api/sync/read-history
Record a single article as read on the server.
Authentication: Required (Kagi session cookie)
UUID that uniquely identifies the story cluster.
Identifier for the news batch in which this story appeared.
UUID of the category the story belongs to.
ISO 8601 timestamp of when the article was read.
Time spent reading in seconds, if tracked.
BCP 47 language code of the article (e.g.
"en").Idempotency key — a stable, client-generated identifier for this read event. The server uses it to prevent duplicate insertions when the same event is submitted more than once.
DELETE /api/sync/read-history
Remove an article read entry from the server-side history.
Authentication: Required (Kagi session cookie)
POST /api/sync/read-history-bulk
Upload multiple read history entries in a single request. Used during the initial sync when a device logs in for the first time and needs to upload its full local history. Entries are processed in chunks of up to 1,000 to avoid overloading the server.
Authentication: Required (Kagi session cookie)
Stable device identifier used for deduplication.
Array of read history entries to upload. Each entry follows the same shape as
POST /api/sync/read-history.Number of entries newly added to the server.
Number of entries ignored because they were already present (matched by
clientId).Synonym for
uploaded returned in some response variants.Read History Change Log
GET /api/sync/read-history-changes
Fetch incremental changes to read history since a given sequence number. This is the primary mechanism for delta sync: clients store the last seen sequence number locally and pass it back on the next poll to receive only new operations, avoiding full-history transfers.
Authentication: Required (Kagi session cookie)
The calling device’s stable identifier. The server excludes changes that originated from this device to avoid echo-back.
The sequence number from the previous successful sync. Defaults to
0 (returns all changes). Persist the lastSequence value returned in each response and pass it on subsequent calls.true on a successful response.Ordered list of change operations since
lastSequence.The highest sequence number in this response. Persist this value and pass it as
lastSequence on the next poll.POST /api/sync/read-history-changes
Record one or more read/delete operations in the change log. This is the preferred method for recording reads in real time — instead of posting to /api/sync/read-history directly, the official client writes a change-log entry here so all other devices can pick it up via the GET endpoint above.
Authentication: Required (Kagi session cookie)
Stable device identifier.
List of change-log entries to append.
PUT /api/sync/read-history-changes
Update an existing change-log entry. Used to amend metadata (e.g. update readDuration after the user finishes reading an article that was initially opened).
Authentication: Required (Kagi session cookie)
SyncState Reference
TheSyncState interface describes the real-time sync status exposed to the UI. Custom front-ends can replicate this model to surface sync feedback to users.
| Field | Type | Description |
|---|---|---|
isSyncing | boolean | true while a sync request is in flight. |
lastSyncedAt | Date | null | Timestamp of the last successful sync, or null if never synced. |
pendingChanges | number | Count of local changes not yet pushed to the server. |
syncError | string | null | Error message from the most recent failed sync, or null on success. |
isOnline | boolean | Reflects navigator.onLine. Sync is skipped while false. |
429 Too Many Requests, starting at 5 seconds and doubling up to a maximum of 60 seconds.