Changes and export
GET /api/v2/changes is the world’s change feed: every create, update and delete, in order. Walked from the start it is a full export; walked from a stored cursor it returns what changed since.
The feed
Section titled “The feed”curl -s "https://www.onlyworlds.com/api/v2/changes?limit=1" -H "API-Key: 0000000000"{ "cursor": "1:068e2e60-fc37-789e-8000-a64560195ff8", "has_more": true, "head": 226, "epoch": null, "epoch_reason": null, "changes": [
{ "op": "upsert", "type": "ability", "id": "068e2e60-fc37-789e-8000-a64560195ff8", "change_seq": 1,
"updated_at": "2025-10-05T21:41:35.764549+00:00", "element": { "type": "ability", "name": "Piano Playing", "…": "…" } } ] }That is Hyperion’s first page. The next call sends ?since=1:068e2e60-fc37-789e-8000-a64560195ff8. A delete in the feed reads:
{ "op": "delete", "type": "location", "id": "…", "change_seq": 41, "deleted_at": "…", "deleted_by": null, "deleted_via": "api", "deleted_client": null, "reason": "deleted" }| Key | Meaning |
|---|---|
changes |
The ops on this page, sorted by the world’s change sequence |
cursor |
Pass it back as ?since= for the next page. Its shape varies (a page’s cursor such as "1:068e…", or a number from ?head=true), so store it as it came |
has_more |
true if more pages remain |
head |
The world’s change sequence as the page began to be read. Every op on the page is at or below it, and a change made while the page was being read comes on a later read from its cursor (since 2026-11-19) |
epoch |
A guest’s or a contributor’s view epoch (Guests’ cursors); null for the owner’s and co-builders’ keys |
epoch_reason |
Why epoch last moved, role or view (What a reset keeps); null when epoch is |
An upsert carries the whole element at its latest state, in the same body a read returns. The upsert a hide or an unhide gives the readers who still see the element also says when, who and through which door (changed_at, changed_by, changed_via; see Hidden elements); no other upsert carries them. A delete carries the id, deleted_at, who deleted it through which door and which client (deleted_by, deleted_via, deleted_client: see Agent writes), and why, in reason: deleted for a tombstone, hidden for an element hidden from this key (a third value, out_of_view, is reserved: nothing sends it yet). Remove the element from your copy either way.
An element deleted while a page is being read is left out of that page, and its delete comes on this page or later in the feed from the cursor the page gives (since 2026-11-19; before, such a page could answer 500).
An element hidden while a page is being read is not served on that page to a reader the hidden mark keeps it from: a contributor, a guest or the public reader (since 2026-11-19; before, such a page could carry the body of an element hidden a moment earlier). What that reader learns of the hide comes later in the feed, as Full export and Guests’ cursors describe; a contributor may miss its own creation on that page, and gets it back at the hide’s row on its next read.
Walking the feed
Section titled “Walking the feed”Pass the returned cursor back as ?since= until has_more is false. Store the last cursor; next time, start from it.
| Parameter | Meaning |
|---|---|
since |
The cursor to continue from. Omit it to start from the beginning |
limit |
Ops per page: default 500, at most 1000. A value out of range or not an integer is a 422 |
head |
?head=true returns only the current tip (head, and a cursor to follow from), with no elements. The answer carries ETag: "<head>:<epoch>" (- for a null epoch) and Cache-Control: no-store; send that tag back exactly as received in If-None-Match on your next poll (the 200’s tag may carry a W/ prefix, a compressed body’s weak tag; never strip or compare it) and an unmoved head answers 304 with no body, which is given back to your request budget: up to 120 a minute per key or account token, and a 200, or a 304 past those 120, counts. The tag covers the epoch on purpose: a guest’s or contributor’s view can move with head unchanged, and the tag moves with it. After a 409, poll once without the tag to read epoch_reason (since 2026-10-22) |
after |
An ISO 8601 time (2026-10-21T09:00:00Z; no offset means UTC; send a + offset as %2B): only the changes made at or after it, an upsert by its updated_at, a delete by its deleted_at. A filter, not a position: the order, cursor, has_more and head are as without it, so read the whole window by passing the cursor back as since with the same after until has_more is false. Anything that is not a date and time is a 422 naming after |
- Treat the cursor as opaque. Pass back exactly what you received.
- The continuation parameter is
since. Any other parameter, such ascursor=, is a422, never silently ignored. - Apply ops in the order given. Upserts and deletes are interleaved by sequence; applying them in that order makes the local copy converge.
- The cursor never expires. Tombstones are kept indefinitely, so an old cursor still replays every delete after it.
- An empty
changeslist means nothing changed since that cursor; the cursor comes back unchanged. ?head=trueis the cheap way to start following a world from now, or to check whether you are behind; with the tag it gave you inIf-None-Match, an unmoved head is a304that is given back to the budget, up to 120 a minute. Compareheadwith the head you last applied, not the previous poll’s, so a missed tick never drops a change.
import requests
BASE = "https://www.onlyworlds.com/api/v2"
HEADERS = {"API-Key": "ow_r_…"} # any key on the world; reads need no PIN
def pull(since=None):
"""Walk the feed from `since` (None = full export). Returns the ops and the next cursor."""
ops = []
while True:
params = {"limit": 1000}
if since is not None:
params["since"] = since
page = requests.get(f"{BASE}/changes", headers=HEADERS, params=params).json()
ops.extend(page["changes"])
since = page["cursor"]
if not page["has_more"]:
return ops, sinceFull export
Section titled “Full export”Walking GET /api/v2/changes from no since until has_more is false gives every live element at its latest state, plus a tombstone for each delete: the whole world. Most worlds take several pages. There is no separate export route. Deletes are always explicit delete ops, never inferred from an element’s absence.
A key that may not see an element the owner or a co-builder hid walks the feed without it, without a tombstone of its id, and with its links left out of the bodies. A contributor learns of a hide from a delete op with reason hidden; a guest’s cursor is reset instead. The owner, a co-builder and the member who made it get an upsert at the hide’s place, its body with hidden: true, and another at an unhide’s place, without it. See Hidden elements.
World fields (name, the time fields and the rest of GET /api/v2/world) are not in the feed. Poll GET /api/v2/world and compare updated_at; element writes never change the world’s updated_at.
Rewinds and head
Section titled “Rewinds and head”In normal operation a world’s change sequence only moves forward. The one exception is a restore of the whole platform’s database from backup after a disaster, which rewinds it. Restoring one world, an owner’s restore to a day included, arrives as ordinary writes and never rewinds. If your stored position is beyond the head in a response, a restore happened: treat your cursor as invalid and pull again from the start.
Guests’ cursors
Section titled “Guests’ cursors”For the owner’s and co-builders’ keys, everything above holds. A guest key walks only what it can see:
- Its cursor has three parts. It is still opaque: pass back exactly what you got.
- It never receives
deleteops. - When the guest’s view shrinks or changes wholesale (an element leaves it, an existing element enters it, the roster changes, or the guest’s own role changes), the next call answers
409resync_required. Pull again fromsince=0. What happens to what your copy holds that the new walk does not name: What a reset keeps; without areason, keep it, since a reset never empties a copy. - A guest may always start from
since=0or with nosince. ?head=truegives a guest a cursor it passes straight back assince.headin a page is still the world’s change sequence.epoch, on every page and on?head=true, is the guest’s view epoch. It moves when the guest’s view changes without the change sequence moving (a Character given or taken, a role). A tip whoseepochdiffers from the one you last applied means pull again; read it from this field, never out of the cursor.
A contributor carries the same three-part cursor, epoch and ?head=true cursor, and the same 409 rules, but it still receives every delete op; a contributor’s cursor stored before hidden elements arrived answers 409 once. See The contributor’s cursor.
A member’s move to or from the guest or the contributor role resets its cursor: its next call answers 409 resync_required. A three-part cursor from the owner or a co-builder is the same 409.
What a reset keeps
Section titled “What a reset keeps”Sharing is forward-only: what a reader has already read is theirs to keep, and a key or a role governs only what arrives next. The 409 says why in reason, inside error, and its message says what that reason means:
{ "error": { "type": "invalid_request", "code": "resync_required",
"message": "Your view of this world changed (reason view). Pull the feed again from the start (since=0); drop what you hold that the new walk does not name.",
"param": "since", "doc_url": "https://onlyworlds.github.io/api/errors/#resync_required", "reason": "view" } }reason |
What moved since your cursor | What your copy holds that the new walk does not name |
|---|---|---|
role |
Your own role or membership: a role change, a seat following its sponsor down, a removal, a reactivation | Keep it. It is out of your view now, not gone |
view |
What you may see: a delete, a hide, an unhide, a Character given or taken | Drop it |
When both happened since your cursor, the answer is role. A delete op with reason hidden is dropped, as for view. A tool never empties a copy on its own.
Every page and ?head=true carry epoch_reason beside epoch, with the same values: why the epoch last moved (view for an epoch that never moved, null when epoch is null). It names the last move only. If your tip is more than one epoch past the one you applied, walk with your stored cursor and read the 409’s reason, which covers every move since that cursor.
A 409 with no reason (from a server older than 2026-10-20) is kept like role: a reset never empties a copy.
The export file
Section titled “The export file”The world page’s Download JSON button (Access, This world as a file; the owner’s) downloads the whole world as one JSON file, separate from the API feed. It is self-describing:
{
"format": "onlyworlds-world-export",
"schema_version": "00.34.01",
"exported_at": "…",
"world": {
"id": "…", "name": "Hyperion", "description": "…", "time_basic_unit": "Year",
"time_range_current": 0, "length_unit": "", "public_read": false,
"created_at": "…", "updated_at": "…",
"source": { "server": "https://www.onlyworlds.com", "world": "…", "at": "…" },
"exported_as": { "kind": "owner", "role": "owner", "character": null }
},
"elements": {
"character": [ { "id": "…", "type": "character", "name": "The Consul" } ],
"institution": [ { "id": "…", "type": "institution", "name": "The Hegemony" } ]
}
}formatis always the literal"onlyworlds-world-export"; a reader should reject a file without it. The envelope’s shape is keyed byformatalone: a breaking change would change it.elementsis keyed by lowercase element type slug, each an array ordered bycreated_at. Only element types with at least one element appear.- Element bodies are exactly what the API returns, extension fields included.
world.idis the world’s identity: an importer should keep it rather than mint a new one.worldis the World whole (since 2026-10-23): every keyGET /api/v2/worldserves, its description, time settings, units, switches,slugandpublic_pageincluded, besidesourceandexported_as. A file from before carries the id, the name, the dates and the provenance lines only.schema_versionis the version of the standard the elements follow (the valueX-OW-Schema-Versioncarries); it is information, not a gate. Files from before 2026-10-18 carry0.30.00there. Readers ignore keys they do not know.world.sourceandworld.exported_asare the folder format’s provenance lines: where the file came from, and that it is the owner’s whole world. A tool that writes the file out as a folder carries both intoworld.jsonas they are. A file without them predates 2026-10-20.
Restores in the feed
Section titled “Restores in the feed”A world’s owner can restore it to a day from the world page, from the daily files onlyworlds.com keeps for 90 days. A restore reaches the API as ordinary writes, never a rewind: every element in that day’s file arrives as an upsert, every element made since as a delete, each with a new change_seq above the head, so head never goes back and a stored cursor stays good. The writes carry the site door with changed_by null, the owner’s. A restore re-hides any element the world had hidden that comes back without its mark, and moves every guest’s view epoch with reason view, so a guest’s next feed read answers 409 resync_required: walk again from 0. Memberships, keys, seats, files and proposals are left as they are, except what a delete always takes with its element (its marks, files and proposals). World settings go back too, the World’s extension keys exactly as the file has them (one added since is removed; its origin is never touched), which the feed never carries: poll GET /api/v2/world.