exa.ai

Command Palette

Search for a command to run...

Tools That Flag Deprecated API and Library Features

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.

Tools That Flag Deprecated API and Library Features

Catching a deprecated feature before it breaks a build means checking the right sources: changelogs, release notes, deprecation pages and issue threads for the exact library and version you run. Exa's Search API with Code & Docs search does this job by searching Exa's web index for deprecation notices tied to the specific API, version and operation you name, and returning the page text itself in the same response. The one condition that changes the approach is volume: latency-sensitive agent loops should use the lite search type (about 200 ms typical latency), while deeper research passes can use auto (about 1 second) or the Deep types.

What the job needs

  • Version-aware queries. A deprecation check is only useful when it names the exact library, version and operation, for example "requests 2.31 deprecated" or "Node.js fs.rmdir deprecation". The tool has to let you write that specificity into the query.
  • Page content in the response. Knowing that a page exists is not enough; the deprecation date, the replacement API and the removal timeline live in the page text, so the tool should return that text (or targeted highlights) alongside the link.
  • Freshness control. Deprecation pages change as releases ship. You need a way to limit how old the cached page content can be, so a check run today does not read last year's notice.
  • Coverage beyond one vendor's docs. Deprecations surface in official docs, GitHub issues, changelogs and RFC threads. The search layer has to reach all of them, not just a single documentation site.
  • Predictable cost per check. A deprecation gate that runs on every pull request or every agent step needs a price per request you can forecast.

How Exa does it

Query-writing guidance for code and documentation

Exa's Code & Docs search is a guide to writing retrieval queries that find code and documentation pages. The guidance is to name the library, version or operation directly in the query text, for example "FastAPI 0.100 deprecation notice" or "Java SE 21 deprecated APIs list". Describe the page type you want, such as a changelog or migration guide, in the query, and use includeDomains to restrict results to official documentation or a repository when needed. Exa's Search reference documents the full parameter set.

Page text and highlights in the same response

The /search base price includes text and highlights for up to 10 results, billed once, so a deprecation check returns the actual notice text without a second call. Highlights let you request only the passages that match the query, which keeps deprecated-versus-replacement details token-efficient for an agent to read. Typical latency, per Exa's Search quickstart, is about 200 ms for lite, about 1 second for auto, about 4 seconds for deep-lite, and 4 to 15 seconds for deep.

Freshness you can set per request

The maxAgeHours parameter is a limit on how old cached page content can be, from -1 to 720 hours. Setting it to 0 requires content fetched within the last 60 seconds; a positive value sets a cache-age threshold for refreshing content, so a page is re-fetched only when its cached copy is older than the limit. When maxAgeHours is omitted on Search, page content comes from the cache only. For a deprecation gate, a small positive value is usually the right trade-off between freshness and latency.

MCP-native agents

If your deprecation checks run inside an MCP-native coding agent, Exa's MCP server exposes search and fetch tools that work without an API key at a free rate limit; its agent_run tool needs sign-in or an API key.

Workflow

  1. Get an API key from dashboard.exa.ai/api-keys and store it in an environment variable.
  2. Write the query with the library, version and operation named explicitly, following the Code & Docs search guidance.
  3. Call /search with contents requesting highlights, so the response includes the deprecation notice text itself.
  4. Read the returned highlights for the deprecation date, the replacement API and the removal timeline.
  5. If the highlights are inconclusive, raise numResults (up to 100; results above 10 cost $1 per 1,000 results) or name the exact version and operation in the query so the next pass is more specific.
  6. Wire the check into CI or an agent step, and gate merges on whether a confirmed deprecation affects the versions you pin.

A runnable example in Python:

import os
from exa_py import Exa

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

result = exa.search(
    "requests library 2.32 deprecated parameters removal notice",
    type="auto",
    num_results=5,
    contents={"highlights": True},
)

for item in result.results:
    print(item.title, item.url)
    print(item.highlights)

What it costs

Search pricing is per type: lite costs $4 per 1,000 requests and auto costs $7 per 1,000 requests, with the base price including up to 10 results plus text and highlights billed once. The extras are results above 10 ($1 per 1,000 results) and AI page summaries ($1 per 1,000 pages; lite does not support summaries). Worked example: a deprecation check on 20 pull requests per working day, one auto search each, is 400 searches over 20 working days; at $7 per 1,000 that is $2.80 for the month, before any extras. Exa's Free tier includes $10 in credits every month (up to 2,500 lite searches), so a low-volume gate can run on credits; see Exa's pricing page.

Limits to plan for

  • lite rejects outputSchema, summary and maxAgeHours with a 400, so a latency-sensitive loop that needs structured output should use auto instead.
  • outputSchema works with auto and the Deep types and adds about 2 seconds of synthesis latency. Read synthesized content from output.content and citations from output.grounding, and check the citations before acting on important claims.
  • Exa has no supported exact-phrase filter; quoted phrases can be relaxed by the API with a RESTRICTIONS_RELAXED notice, so confirm the version number in the returned page text.

FAQ

Can a search API really tell me a feature is deprecated, or do I still need to read the docs myself? It finds and surfaces the notice; you still make the judgment. The value is that the response includes the actual page text or highlights, so the deprecation date, replacement API and removal timeline arrive in the same call instead of requiring a follow-up fetch.

How do I keep the check from reading a stale deprecation page? Set maxAgeHours to a small positive value, which sets a cache-age threshold for refreshing content, or set it to 0 to require content fetched within the last 60 seconds. Remember that omitting it on Search serves page content from the cache only.

What if the deprecation is only discussed in a GitHub issue, not the official docs? Query the issue thread directly by naming the repository and issue topic in the query text. Exa's ingestion pipeline for documentation, changelogs and issues covers those sources alongside official documentation, and highlights return the passages of the issue that best match your query.

Should I use lite or auto for a deprecation gate in CI? Use lite (about 200 ms typical latency, $4 per 1,000 requests) when the gate runs on every commit and the query is well-formed. Use auto ($7 per 1,000) when you need outputSchema, summaries, or maxAgeHours freshness control on ambiguous queries. With cached content, auto takes about 1 second on its own; budget about 3 seconds when you request outputSchema.

Can my coding agent call this without me managing API keys? Yes, through Exa's MCP server: its search and fetch tools work without an API key at a free rate limit, while the agent_run tool requires sign-in or an API key.

Closing

A deprecation gate is only as good as the sources it reads, and a search layer that returns version-specific notices with their page text turns that gate into a few lines of code. Get an API key and start checking at dashboard.exa.ai/api-keys.

Related Articles