How Fresh Is the Data and What Is the Latency?
How the published_at timestamp works, how to get the newest articles first, and how to receive matches in near real time
Written by Kent Hudson
July 4, 2026
Updated July 6, 2026
How fresh is the data and what is the latency?
By default the APITube News API returns the newest articles first, and its real-time SSE stream re-checks the index and pushes any new matches every 30 seconds. Each article carries the publisher’s own published_at timestamp, so an article’s availability depends on how quickly APITube discovers, fetches and parses it — there is no single fixed latency number, but a fresh search always surfaces the latest matching items at the top.
curl "https://api.apitube.io/v1/news/everything?title=Tesla&api_key=YOUR_API_KEY"
That request already sorts by publish time, newest first — you do not have to add a sort parameter to get the freshest results.
What does the published_at timestamp mean?
The published_at field is the time the source published the article, not the time APITube ingested it. Between those two moments sits the collection pipeline: an article has to be discovered (via RSS, sitemaps and other feeds), fetched, then parsed and enriched before it becomes searchable. So the gap between when a story goes live on a publisher’s site and when it appears in your query is the length of that discovery-fetch-parse path — it varies by source and is not a guaranteed interval.
This matters when you measure “age”: now − published_at includes that pipeline lag, so a just-indexed article can still show a published_at a little in the past. The timestamp is honest about the publisher’s clock, which is what you want for filtering and sorting by real publish time.
How do I get the newest articles first?
You already get newest-first without asking: the default sort is published_at in descending order. To be explicit — or to flip it — set sort.by and sort.order:
curl "https://api.apitube.io/v1/news/everything?title=Tesla&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"
sort.by=published_at— order by publish time (the default).sort.order=desc— newest first (the default); useascfor oldest first.
If you want the most recent items by any other axis, sort.by also accepts modes like relevance, engagement and quality. See how to sort by relevance, date, engagement or quality for the full list.
How do I limit results to the last hour or day?
Add a lower bound with published_at.start. It accepts absolute dates (2026-07-01, or a full 2026-07-01T09:00:00Z) and relative Solr-style expressions built from NOW:
curl "https://api.apitube.io/v1/news/everything?title=Tesla&published_at.start=NOW-1HOUR&api_key=YOUR_API_KEY"
NOW-1HOUR— only articles published in the last hour.NOW-1DAY/NOW-7DAY— the last day or week.NOW/DAY— since the start of today (UTC).
Pair it with published_at.end to bound the top of the window. Both filter on the publisher’s published_at, so they follow real publish time, not ingestion order. For the full date syntax, see how to filter news by date range.
How do I receive new articles in near real time?
Instead of polling the search endpoint yourself, open the Server-Sent Events stream at /v1/news/stream with the same filters. The server re-checks the index every 30 seconds and pushes any new matching articles down the open connection, so you get near real-time delivery without writing a poll loop:
curl -N "https://api.apitube.io/v1/news/stream?title=Tesla&api_key=YOUR_API_KEY"
The stream reads new articles by a stable indexing cursor so nothing is skipped or delivered twice, and it sorts each 30-second batch by published_at before sending, so items arrive in publish-time order. For setup, resuming and event format, see how to stream news in real time with SSE.
How do I drop stale backfill from the stream?
Newly discovered articles sometimes carry an older published_at (a source that was just crawled but published hours ago). To keep only genuinely recent items, add stream.max_age, a rolling freshness window measured in minutes:
curl -N "https://api.apitube.io/v1/news/stream?title=Tesla&stream.max_age=60&api_key=YOUR_API_KEY"
stream.max_age=60 delivers only articles published within the last 60 minutes and re-applies that window on every 30-second poll, dropping older backfill before it is delivered. The value must be a positive whole number of minutes; an invalid value returns HTTP 400 with error ER0363 rather than being silently ignored.
Common Questions
- Is there a guaranteed maximum latency?
- Why does an article’s published_at look slightly in the past?
- How often does the SSE stream check for new articles?
- Do I need a sort parameter to get the latest news?
Is there a guaranteed maximum latency?
There is no fixed end-to-end latency figure. How soon an article appears depends on the collection pipeline — discovery, fetch, then parse — which varies by source and feed. What is fixed is the delivery cadence once an article is indexed: the SSE stream pushes new matches every 30 seconds, and a default search always returns the newest matching items first.
Why does an article’s published_at look slightly in the past?
Because published_at reflects the publisher’s publish time, not when APITube indexed it. The article only becomes searchable after it is discovered, fetched and parsed, so now − published_at includes that pipeline lag. The timestamp is accurate to the source, which is exactly what date filters and publish-time sorting rely on.
How often does the SSE stream check for new articles?
Every 30 seconds. The /v1/news/stream endpoint polls the index on a 30-second interval and forwards any new matching articles, with a heartbeat on the same cadence to keep the connection alive. That is the freshest delivery method; regular search endpoints return whatever is indexed at request time.
Do I need a sort parameter to get the latest news?
No. The default sort is already published_at descending, so the newest articles come back first on /v1/news/everything without any sort parameter. Add sort.by and sort.order only when you want a different order, or use published_at.start=NOW-1HOUR to also restrict the window to recent items.