> For the complete documentation index, see [llms.txt](https://developer.openactive.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.openactive.io/publishing-data/data-feeds/how-a-data-feed-works.md).

# How an RPDE data feed works

## RPDE feeds explained

The following video is a beta explainer animation for Realtime Paged Data Exchange (RPDE) feeds. If you find this short video useful, please drop any feedback to <hello@openactive.io>, and we will extend it into a full explanation.

For a full explanation of how to create an RPDE feed, please see the [specification](https://www.openactive.io/realtime-paged-data-exchange/#paging).

{% embed url="<https://youtu.be/yHZS24xzY-8>" %}

## Must Read: Principles of Feeds

### Items must never disappear

It's important to ensure that items don't disappear from the feed without first passing through the `deleted` state, as if this happens they will live on forever in the downstream apps and services, which will have cached the previously published version indefinitely.

See the [deleted items](https://www.openactive.io/realtime-paged-data-exchange/#deleted-items) section of the specification for more information.

### The query must be followed exactly

Misreading the query in the specification is the single most common cause of incorrect implementation. Please read it carefully and ensure that brackets and comparators are used correctly. `>` not `>=` for example.

Please ensure that you have implemented [this query](https://www.openactive.io/realtime-paged-data-exchange/#sql-query-example-for-timestamp-id) correctly:

```sql
--include WHERE clause only if @afterTimestamp and @afterId provided
   WHERE (modified = @afterTimestamp AND id > @afterId)
      OR (modified > @afterTimestamp)
ORDER BY modified, id
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.openactive.io/publishing-data/data-feeds/how-a-data-feed-works.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
