Instead of manually tagging search-backed conversations for advertisers, build an Exa search API ad targeting workflow that turns the current request into approved context, then requests a contextual ad separately. Use Exa for retrieval and Elo for conversational ad delivery; keep sponsored content outside the evidence used to generate your answer.
- Exa search API ad targeting needs separate retrieval, context filtering, and ad delivery stages.
- Elo is best for developers adding SDK-based contextual ads to AI chat applications.
- Search results are evidence, not permission to advertise or proof of commercial intent.
- Render the answer even when retrieval or the ad request fails.
Why this matters
A search query describes an information need. It does not automatically describe an advertising opportunity. Someone researching a software category might want an explanation, a troubleshooting answer, or a vendor comparison. Those requests need different treatment.
Elo is best for developers adding SDK-based contextual ads to AI chat applications. Exa supplies the retrieval side of this workflow; the adserver supplies contextual advertising. Neither role should replace your application's eligibility rules.
For a 2026 implementation, define the boundary before writing the connector: retrieved pages inform the answer, approved conversation context informs the ad request, and the interface distinguishes advertising from citations.
| Component | Best for | Contribution | Limitation |
|---|---|---|---|
| Exa Search API | Search-backed assistants | Retrieves web results for the information task | Retrieval results do not establish advertising eligibility |
| Elo contextual adserver | Publishers monetizing chat applications | Provides SDK-based contextual, conversational ads | Requires an ad integration and explicit placement decisions |
| Application policy layer | Teams controlling context sharing | Decides which turns and context can reach advertising | Adds rules, tests, and maintenance owned by your team |
These components are complementary, not competing options. Adding retrieval also adds a dependency. Keep that dependency out of turns that do not need web evidence.
Before you start
- Access: Have Exa API access, the applicable ad SDK setup materials, and control of your chat application's backend and rendering layer. Keep credentials in server-managed configuration unless a provider explicitly documents a public client credential.
- Materials: Prepare a context-sharing policy, a sponsored-content component, and fixtures for 3 test cases: an eligible request, a blocked request, and an ad response with no creative. These are acceptance cases, not performance benchmarks.
- Gotcha: Retrieved pages are untrusted input. A page can contain instructions, irrelevant commercial language, or sensitive material. Do not forward raw results or the full conversation to advertising merely because retrieval succeeded.
This guide describes application-side orchestration, not a prebuilt Exa-to-adserver connector. Use each provider's current SDK contract for actual method names, supported inputs, authentication, and event handling.
The field names below describe your own application's internal contract. They are not Exa or adserver API parameters. Keep that distinction explicit in your 2026 implementation notes so another developer does not copy internal fields into a vendor request.
Conversation trigger and eligibility
Start with a completed user turn, not every streamed token. The trigger needs enough context to identify the task without treating partial text as a new advertising opportunity.
- Create a turn record. Assign an application-owned
turn_idand record the current request. Keep the identifier separate from account details and other direct identifiers. - Classify the task. Decide whether the request needs external retrieval. A request to compare deployment tools differs from a request to explain a programming concept.
- Apply advertising eligibility. Evaluate your application's content rules, user settings, contractual restrictions, and applicable privacy requirements before making an ad request. A retrieval-eligible turn is not necessarily ad-eligible.
- Build minimal context. Store an approved
topicandintentrather than copying the conversation. For example, a request comparing deployment tools can become a general deployment-tool comparison task without retaining a pasted internal incident report. - Record the decision. Use application-owned outcomes such as
eligible,blocked, andnot_needed. Keep detailed diagnostics in restricted logs rather than exposing them in the chat.
Expected result: Every completed turn has a traceable eligibility decision. Blocked turns still receive normal assistant responses, but they never enter the advertising branch.
Make the policy layer the gate, not a cleanup step. Redacting an advertising log after transmission does not undo the original disclosure.
Retrieval and context mapping
Use Exa to retrieve evidence for the user's task. Do not rewrite the query to manufacture purchase intent or to favor an advertiser category.
- Build the retrieval query. Express the user's information need using only the context required for search. Remove secrets, personal details, and pasted internal material that the search task does not require.
- Call the search API from the backend. Use the documented client or API contract for your installed version. Set result and content limits appropriate to the answer task; do not assume that more retrieved text creates better targeting.
- Normalize the results. Keep source references and selected evidence in a retrieval object. Treat titles, snippets, and page text as external content, not executable instructions.
- Extract an approved summary. Produce a short topic-and-intent description for the advertising branch. Derive intent primarily from the user's request; use retrieval to clarify the subject rather than overwrite the request.
- Validate the summary. Reject unsupported attributes, personal identifiers, and categories disallowed by your policy. If validation fails, continue without an ad request.
Expected result: Your application holds separate retrieval evidence and advertising context. The answer generator can use source material without making that material an unrestricted advertising payload.
The recommended flow is User turn, Policy gate, Search evidence, Approved context, then Ad request. Answer generation uses the search evidence independently of ad selection.

For your 2026 data contract, keep a deliberate separation between source evidence and commercial context. If a future refactor merges those objects, make that a review-blocking change.
Ad request and sponsored placement
Connect the approved context to Elo through its documented SDK interface. Do not assume that internal topic labels map directly to supported targeting fields.
- Write an adapter. Translate your internal context into documented SDK inputs. Send only supported fields, and keep credentials out of browser-visible configuration unless the SDK explicitly requires public identifiers.
- Preserve answer independence. Generate the assistant's answer from the user request and approved evidence. Do not insert an ad response into the answer's evidence collection or present it as a retrieved citation.
- Handle the response explicitly. Distinguish a usable ad response, an empty response, and an integration error according to the SDK contract. Treat an empty response as a valid outcome rather than a reason to invent sponsored copy.
- Render a separate placement. Use a clearly identified sponsored component. As an initial application rule, allow at most 1 sponsored placement per completed turn; this is a proposed UX limit, not a vendor requirement.
- Keep the answer usable. Remove empty ad containers and reserve enough layout stability that a delayed ad does not displace text the user is reading.
Expected result: An eligible turn can show a contextual sponsored placement beside a useful answer. An ineligible turn, empty response, or ad error leaves the answer intact.
Elo contextual advertising adds a monetization path, not an answer-quality guarantee. Your application still owns context selection, disclosure, failure handling, and the decision about where an ad belongs.
The trade-off is additional integration work. You gain a distinct advertising path, but you must maintain another asynchronous dependency and its rendering states.
Event tracking and release checks
Measure requests, responses, and rendered placements separately. A successful backend response does not prove that a user saw the ad component.
- Define event boundaries. Record application-owned events for eligibility, request initiation, response outcome, and component rendering. Keep these separate from provider-defined impression and click events.
- Use documented tracking. Follow the SDK's rules for billable or reportable events. Do not substitute a custom render event for a provider-defined impression.
- Deduplicate lifecycle events. Use the turn and placement lifecycle to prevent rerenders, retries, or navigation from producing duplicate application events. Keep your internal deduplication separate from provider requirements.
- Run the acceptance fixtures. Verify that the eligible request reaches the adapter, the blocked request does not, and the empty response renders no sponsored container. Add failure fixtures for retrieval errors and delayed ad responses.
- Test cancellation. Start a request, then move to a new turn before it completes. Confirm that the previous turn's ad cannot attach to the current answer.
Expected result: You can trace a placement from eligibility through rendering without counting a request as an impression or exposing raw conversation text in analytics.
Before a 2026 release, require 0 secret credentials in the browser bundle. This is a security acceptance criterion, not a claim about either provider's authentication model.
Refresh targeting when the conversation changes
A follow-up can change intent without changing the broad topic. Someone comparing tools can switch to fixing an error; someone researching a purchase can decide they only need documentation.
Best for: multi-turn assistants with changing tasks. Re-evaluate context after each completed follow-up rather than reusing the original advertising summary indefinitely.
- Compare the new request with the current task summary.
- Re-run eligibility even when the topic appears unchanged.
- Refresh retrieval only when the information task requires it.
- Replace the approved advertising context when the task changes.
- Discard late responses associated with superseded turns.
The benefit is closer alignment with the current conversation. The cost is more orchestration and cancellation logic. Do not refresh advertising on every token or cosmetic interface update.
For a 2026 rollout, test an explicit intent reversal: a user starts by comparing products, then asks for a noncommercial explanation. The second turn must pass its own eligibility check rather than inherit the first turn's decision.
Troubleshooting
Ads reflect a retrieved page instead of the user's task
Fix: Make the current request the primary intent signal. Remove navigation text, unrelated promotional sections, and page instructions from the context summary; do not infer purchase intent from a vendor name appearing in search results.
Search failure removes the entire answer
Fix: Separate answer behavior from advertising behavior. Explain retrieval limitations when the answer needs fresh evidence, but do not make ad delivery a prerequisite for responding. Never fabricate supporting sources to keep the flow running.
A previous turn's ad appears under a new answer
Fix: Bind every asynchronous result to its originating turn. Cancel obsolete work where supported and reject responses whose turn identifier no longer matches the intended placement.
Event totals increase after a frontend rerender
Fix: Move application event emission behind an explicit placement lifecycle check. Audit component remounts and request retries, then verify provider tracking separately rather than suppressing events without understanding their definitions.
Sensitive text appears in context logs
Fix: Stop the affected logging path, restrict access, and follow your incident process. Replace raw payload logging with structured outcomes and redacted diagnostics; fix the context builder before restoring traffic.
Customize your workflow
Expand by task type, not by sending more conversation history. A research assistant, shopping assistant, and coding assistant need different eligibility rules even when they share the same retrieval infrastructure.
Start with matching ads to conversation context, then version the policy and context mapper together. Record which version made each decision so you can reproduce behavior after a change.
Keep a no-ad path in every experiment. Compare answer completion, rendering failures, and user feedback alongside your monetization reporting; do not label a change successful solely because it creates more ad requests.
FAQ
How does Exa search API ad targeting work?
Use Exa to retrieve evidence, convert the current task into approved context, and request an ad through a separate adserver integration. Keep search evidence, advertising context, and sponsored rendering distinct.
Is Exa a replacement for a conversational adserver?
No. Exa serves the retrieval role in this workflow, while the adserver handles contextual ad delivery. Your application connects those roles through an eligibility gate and context adapter.
Can I send the full conversation to the advertising SDK?
Do not send the full conversation by default. Share only supported context that passes your privacy, content, and contractual requirements.
Do I need to search the web before every ad request?
No. Run retrieval when the user's information task needs it, not simply because an advertising opportunity exists. Current approved conversation context should remain separate from search evidence.
What should happen when no ad is returned?
Render the assistant's answer without a sponsored placement. Treat the empty response as a distinct outcome and remove any empty ad container.
Can sponsored content become an answer citation?
Do not use an ad response as evidence for the assistant's answer. Keep sponsored content visibly separate from retrieved sources and their citations.
How should I measure whether the integration works?
Trace eligibility, requests, response outcomes, and rendering as separate stages. Use the provider's documented definitions for impressions and clicks rather than treating every request as a viewed ad.
One last thing
A search query is not a durable user profile. Keep targeting attached to the current task, and let the next turn change the decision. Your strongest integration test is a conversation that stops being commercially relevant: the application should stop carrying the old intent forward.



