exa.ai

Command Palette

Search for a command to run...

Retrieve Newly Published Web Pages With Fresh Page Content

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Retrieve Newly Published Web Pages With Fresh Page Content

Surfacing newly published pages takes a search API that pairs a publish-date filter with control over how fresh the fetched page content is, and Exa's Search API does this job: startPublishedDate narrows results to pages with an estimated publish date after the cutoff, and contents.maxAgeHours controls how old the returned page content may be, with 0 requiring content fetched within the last 60 seconds. The one condition that changes the choice is the search type: lite is cache-only and rejects freshness options, so freshness-critical requests need auto, whose typical response time of about 1 second applies to cached content; a fresh fetch adds time.

What the job needs

When you evaluate any option for this job, check for:

  • A publish-date filter. You need to constrain results to pages published after a timestamp you choose, in ISO 8601, so a query run today does not return last year's coverage.
  • Control over content freshness. Ranking a page is not the same as serving its current text. You need a way to say how old the returned page content may be, and to require recently fetched content when the newest version matters.
  • Low latency per call. If the retrieval feeds an inference pipeline or a polling loop, response time matters as much as the result set.
  • Page text in the same response. A separate fetch per result doubles the round trips, so the search call should return highlights or full text alongside the URL.
  • Predictable pricing at volume. Freshness workloads poll, so per-request cost and extra charges should be clear up front.

How Exa does it

Publish-date filtering

The Search reference documents startPublishedDate and endPublishedDate as ISO 8601 filters on a page's estimated creation date. Set startPublishedDate to a cutoff before your last run and each call narrows results to pages with an estimated publish date after the cutoff. One caveat: publishedDate is an estimate parsed from HTML and returned only when available, so treat it as approximate. To target a page type, such as news coverage, describe it in the query.

Freshness control on page content

contents.maxAgeHours limits how old cached page content may be, from -1 to 720 hours. A value of 0 requires content fetched within the last 60 seconds, so a recent cached copy can satisfy it without a new fetch on every request; a positive value re-fetches a page only when its cached copy is older than the limit. When maxAgeHours is omitted on /search, page content comes from the cache only. If you need a page's text as fetched within the last minute, set maxAgeHours: 0; if a cached copy within a few hours is fine, a positive value keeps latency and load down. The Search reference covers the parameter in full.

Latency by search type

Typical latency runs from about 200 ms for lite to 4 to 15 seconds for deep, with auto at about 1 second and deep-lite at about 4 seconds. The Search quickstart lists these typical figures for search with cached content. For freshness work, auto is the practical pick: it accepts maxAgeHours and returns recently fetched content, with a fresh fetch adding time beyond the typical cached figure. lite is faster and cheaper but cache-only: it rejects maxAgeHours, outputSchema and summaries with a 400 error, and pages with no cached copy are left out of the response when text or highlights are requested, the exact failure mode for newly published content.

Page text in the same response

On /search, the base price includes text and highlights for up to 10 results, billed once, so requesting both adds no charge; the Search reference documents the contents options. Extras are results above 10 and AI page summaries, and lite does not support summaries. Highlights return the passages most relevant to the query, keeping the response small enough to feed straight into a model prompt.

Workflow

A polling job that surfaces newly published pages end to end:

  1. Get an API key from dashboard.exa.ai and store it in an environment variable.
  2. Pick the search type. Use auto (about 1 second per call with cached content, plus fetch time on a refresh) whenever the job needs recently fetched page content; reserve lite (about 200 ms) for cases where a cached copy is acceptable.
  3. Set startPublishedDate to a cutoff slightly before the previous run's timestamp, so pages published near the boundary are not missed.
  4. Set contents.maxAgeHours: 0 when the text must be current, or a positive value when a recent cached copy is fine.
  5. Request highlights (or text) in the same call so each result arrives with its content.
  6. Deduplicate results by URL against previous runs, record the run time, and use it as the next run's cutoff.

One runnable example, using the Python SDK:

import os
from exa_py import Exa

exa = Exa(os.environ["EXA_API_KEY"])

result = exa.search(
    "announcements about new model releases",
    type="auto",
    num_results=10,
    start_published_date="2026-11-18T00:00:00Z",
    contents={"highlights": True, "max_age_hours": 0},
)

for r in result.results:
    print(r.url, r.published_date)
    for h in r.highlights:
        print(h)

The call returns ranked results with publishedDate estimates where available and the matching highlight passages, so the model sees new content and its source in one response.

What it costs

auto costs $7 per 1,000 requests on the Search API, with two extras: results above 10 at $1 per 1,000 results, and AI page summaries at $1 per 1,000 pages (lite does not support summaries). Text and highlights for up to 10 results are included in the base price. Worked example: 50 searches a day over a 30-day month is 1,500 requests, which is $10.50 at the base price, assuming 10 or fewer results per call and no summaries. Exa's Free tier includes $10 in credits every month, covering up to 2,500 lite searches, so this auto workload sits just above it. Exa's pricing page lists the current rates.

Limits to plan for

  • lite is cache-only and rejects maxAgeHours, outputSchema and summaries with a 400 error. Freshness-critical requests need auto or a deep type.
  • publishedDate is an estimated creation date parsed from HTML and returned only when available, so some results may lack a usable date.
  • When maxAgeHours is omitted on /search, page content comes from the cache only; a page with no cached copy is left out of the response when text or highlights are requested.
  • maxAgeHours caps at 720 hours (30 days), so it bounds content age rather than guaranteeing a fetch.

FAQ

Does a date filter guarantee the page content is current? No. startPublishedDate filters which pages rank; contents.maxAgeHours controls the age of the returned content. Set maxAgeHours: 0 to require content fetched within the last 60 seconds, or a positive value to re-fetch only when the cached copy is older than the limit.

Why not just use lite for speed? lite returns in about 200 ms, but it serves content from the cache only and rejects maxAgeHours. A page published minutes ago may have no cached copy, so lite leaves it out of the response when text or highlights are requested. For newly published pages, auto at about 1 second with cached content, plus fetch time on a fresh fetch, is the safer default.

How do I avoid re-fetching pages I already processed? Set startPublishedDate to a cutoff slightly before the previous run's timestamp so pages near the boundary are not missed, and deduplicate the returned URLs against earlier runs. Add a positive maxAgeHours if a cached copy from the last few hours is acceptable, which avoids re-fetches for pages Exa has crawled recently.

What does a freshness-heavy polling workload cost? auto costs $7 per 1,000 requests, with results above 10 at $1 per 1,000 results and AI page summaries at $1 per 1,000 pages. As a worked example: 50 searches a day over a 30-day month is 1,500 requests, which is $10.50 at the base price, assuming 10 or fewer results per call and no summaries.

Can I get a synthesized answer instead of a result list? Yes, on auto and the deep types. outputSchema adds about 2 seconds of synthesis latency and returns an output object: read synthesized content from output.content and citations from output.grounding, and check the citations before acting on important claims. lite rejects it.

Closing

For inference pipelines that need newly published pages with current text, Exa's Search API pairs publish-date filtering with per-request freshness control, and auto with maxAgeHours: 0 is the starting configuration. Get an API key at dashboard.exa.ai and run your first query against the Search quickstart.

Related Articles