# Updates and revisions

A live link shows new numbers when the DFO loads a publisher's revision. A snapshot keeps the numbers it recorded. Cite a snapshot when the numbers must stay fixed, and use a live link when they should stay current.

## How current the data is

Publishers release on different schedules. A source's page on [Sources](/data/sources) lists how often it updates, when it was last refreshed and by whom, and when the next refresh is due.

For sources the DFO imports itself, pipelines check daily for new releases. The pipelines download new releases, check them, and load them into the knowledge graph. If a release fails a check, the graph keeps the previous release. Indicators from the base Data Commons and the UN System Data Commons update on those Commons' schedules.

The graph stores the latest release of every source. Earlier numbers remain only in snapshots, stored versions, and saved files.

For 15 minutes after confirming a dataset, the DFO serves it without rechecking its sources. After that, at the next request the DFO checks the dataset against its sources' refresh dates. If any date has changed, it rebuilds the dataset. A rebuild that produces different rows gets a new `content_version`. If the rows are the same, so is the `content_version`.

An API response for current data includes the header `x-dfo-freshness`. The value is `current` when the DFO confirmed the dataset within the last 15 minutes, `pending` while a check runs, and `stale` when no check could run. In all three cases, the response returns the last confirmed dataset.

## What a revision does to your numbers

What you see after a source revises a number depends on your link:

- A live link on [/data](/data) fetches current data and shows the new numbers.
- A live Studio link redraws its data cards on current data. Titles, notes, and text cards stay as written.
- An embed updates if its link is live and stays fixed if its link is a snapshot.
- A snapshot link, on /data or in Studio, shows the rows it captured regardless of later source revisions.

A Chat + Canvas link is always a snapshot. A Studio canvas or card link is live or a snapshot, as its owner chose. In Studio, **Make this link a snapshot** turns a live link into a snapshot at the same URL. The change is permanent.

## How long the DFO keeps a version

The DFO keeps a snapshot link's data until its owner deletes the link. Creating a snapshot link pins its data, and the DFO creates the link only if the pin succeeds. If the DFO takes a version down, an API request for that version returns `410` with the code `snapshot_revoked`.

For files and versions fetched through the API, an AI assistant connected to the DFO MCP server, or the SDK, retention depends on whether they are pinned:

- The DFO keeps an unpinned file for at least 30 days after it creates the file. It keeps the rows the file was made from for at least 30 days after it stores them.
- A saved download link continues to work after 30 days while the DFO stores the file or its rows. Fetching the link in the last 7 days of the 30, or after they end, renews the file for another 30 days. The DFO rebuilds the file from the stored rows if needed. An earlier fetch leaves the retention date unchanged. After 30 days, the DFO can delete the file and rows at any time.
- The DFO keeps a pinned version indefinitely. Any caller, with or without an API key, can pin a version with `POST /api/v1/datasets/{spec_id}/{content_version}/pin`, and the response's `pinned.url` is the link to cite. [Call the API directly](/docs/build/api) shows the request. A caller other than the DFO site can make 100 new pins a day.
- A download from /data pins its version, so the DFO keeps the version the bundle links to indefinitely. If that pin fails, the download completes anyway and the DFO keeps the version for at least 30 days. The version's page on /data shows either "Kept indefinitely" or "Kept until" followed by a date.

A dataset response reports its retention as either `{"pinned": true}` or `{"pinned": false, "held_until": "2027-01-02T21:11:33Z"}`, where `held_until` is the date the 30-day minimum retention of the stored rows ends. Once both the file and its stored rows are gone, requesting that version returns `410` with the code `artifact_expired`. A request for the dataset's `spec_id` returns current data.

## Check whether a number changed

Open the live link beside the snapshot you cited, or fetch the dataset again and compare `content_version` values. Matching values mean identical rows. The Python SDK can fetch the latest version and compare it against a saved file:

```python
old = dfo.load("kenya-debt.parquet")
new = dfo.fetch(old.ref, latest=True)
if new.ref != old.ref:
    print("DFO's data has changed since you saved it")
```
