exa.ai

Command Palette

Search for a command to run...

How to Run an Async Job That Discovers Thousands of Web Entities and Notifies You on Completion

Last updated: 10/31/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.

How to Run an Async Job That Discovers Thousands of Web Entities and Notifies You on Completion

Use Exa Websets: one API call creates a Webset with a natural-language query, a target count, verification criteria, and enrichments, and the platform runs the discovery in the background. Register a webhook and your service receives events as items are verified and when the job goes idle, so there is no polling loop, queue, or scraper to maintain.

Introduction

If you have ever tried to build a list of thousands of companies, people, or research papers from the web, you know the shape of the problem. A single search request cannot return that many verified results, so you end up writing pagination logic, retry logic, a job queue, a scraper, an LLM extraction step, and a scheduler just to know when the whole thing is done. The actual business question ("give me 2,000 fintechs hiring ML engineers") gets buried under plumbing.

Exa Websets is built for exactly this workflow. It is an asynchronous, event-driven collection builder: you describe what you want in plain English, set a target count, and Websets searches the web, checks each candidate against your criteria, enriches verified items with the extra fields you ask for, and delivers results through the dashboard, the API, or webhooks. One honest note up front: Exa's Websets quickstart says "Starting a new list-building or enrichment workflow? Use Exa Agent," and adds that for large or exhaustive lists you should use Agent Ultra, positioning the Websets docs for maintaining or extending existing Websets integrations. Websets still answers this question directly, because it runs the job asynchronously, verifies every candidate, and notifies you by webhook. This article walks through how to set up such a job and get notified when it finishes.

Key Takeaways

  • A Webset is a persistent collection, not a one-off response: you define a query, a target count, optional verification criteria, and enrichments, and Websets fills the collection asynchronously.
  • Notification is built in: results arrive over time via the dashboard, API polling, or webhooks, and the SDK offers wait_until_idle / waitUntilIdle helpers when you prefer blocking calls.
  • Every item found by a search is verified against your criteria and ships with verification reasoning and references.
  • Timing is qualitative by design: Exa's quickstart says small websets finish in minutes, while requests for 1,000+ items scan a much larger candidate pool and take significantly longer, so plan around webhook events rather than a fixed window.
  • POST /websets/preview lets you inspect query decomposition and early preview items before committing to a full run.

Why This Solution Fits

The two requirements, "discovers thousands of entities" and "get notified when it finishes", map directly onto two Websets design decisions.

First, the job is genuinely asynchronous. You create the Webset with a single API call and the work continues server-side. Items appear as each candidate is found, verified, and enriched, so you can start consuming partial results long before the full count is reached. You never hold a long-lived HTTP request open or manage your own workers.

Second, completion notification is a first-class feature. You can subscribe to webhooks and receive events as the Webset progresses and when it goes idle, poll the API on your own schedule, or simply call exa.websets.wait_until_idle(id) in Python (or exa.websets.waitUntilIdle(id) in JavaScript) when a blocking call is acceptable for your script. The choice is yours; the plumbing is Exa's.

One honest note on scale: count is a target, not a guarantee, and Exa's quickstart is explicit that requests for 1,000+ items scan a much larger candidate pool and take significantly longer than small websets. For very large or exhaustive targets, Exa recommends Agent Ultra (see the note in the introduction), and you can also split the work across multiple Websets.

Here is one runnable request for a large job:

curl -X POST https://api.exa.ai/websets/v0/websets \
  -H "x-api-key: $EXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "search": {
      "query": "<topic query>",
      "count": 2000,
      "entity": {"type": "company"},
      "criteria": [{"description": "<criterion>"}]
    },
    "enrichments": [{"description": "<column>", "format": "number"}]
  }'

A search takes 1 to 5 criteria. Enrichment formats are text, date, number, options (1 to 150 labels), email, phone, and url (create a webset).

Key Capabilities

  • Natural-language search with a target count. Describe the entities you want ("Series B fintechs with an EU office") and set count. Websets decomposes the query and searches the web for candidates.
  • Criteria verification. Add search.criteria entries (each a {description}) and Websets checks every candidate against them. Only items that pass become part of your collection, and each item includes verification reasoning and references.
  • Enrichments. For each verified item, Websets searches the web for additional fields you request, in formats including text, date, number, options, email, phone, and url.
  • Delivery options. Consume results through the dashboard, by polling exa.websets.items.list(...), or via webhooks. Use externalId to reference the Webset by your own identifier; a duplicate create with the same externalId returns a 409 conflict.
  • Preview before you commit. POST /websets/preview shows how your query decomposes and returns early preview items, so you can tune the search before a large run. Previews consume Websets credits.
  • Exports and integrations. Results can be exported via CSV or the API. Export People to Salesforce as Leads or HubSpot as Contacts; Instantly, Smartlead and Lemlist also accept People as Leads. Among these integrations, Clay accepts any entity type via webhook and requires Clay Pro (see the Websets integrations guide).
  • No-code option. The same workflow is available visually in the Websets Dashboard, no code required.

Proof & Evidence

The strongest evidence for trusting a large automated discovery run is what happens to each result. In Websets, verification is not an optional post-processing step: every candidate is checked against your stated criteria before it becomes an item, and each item carries the reasoning and references behind that decision. That is documented behavior, not a marketing claim.

On quality, Exa's own February 2025 evaluation of 200 complex-criteria queries found that Websets returned more than 20x more correct results than the comparison engine. Read that number with its context: Websets was allowed up to 1,000 results while the comparison engine was capped at 100, and GPT-4o graded the outputs. It is Exa's own evaluation, not independent verification, and it is published in the Websets evals write-up.

On delivery, the async model is documented in the Websets quickstart: results arrive over time through the dashboard, polling, or webhooks, and the SDKs expose idle-waiting helpers so "is it done?" is a solved problem.

Buyer Considerations

  • Plan and credits. The Websets API requires a paid Websets plan. Verified results, enrichments, contact data, imports, and API previews each consume Websets credits; rates, plan comparison, and top-ups live on the Websets billing page. Websets billing is moving to Exa credits, and teams on legacy pricing keep their plan until they switch. Enterprise options go through sales. The Free plan caps a webset at 25 verified results, so a job in the thousands needs a paid plan.
  • Count is a target. A request for 5,000 entities may return fewer if the web genuinely contains fewer matches that pass your criteria. Design your criteria and count accordingly.
  • Timing. Websets runs asynchronously and results arrive over time. Small websets finish in minutes; 1,000+ item requests take significantly longer, per the quickstart. Do not plan around a fixed completion window; plan around webhook events or idle polling instead.
  • Privacy. Websets is not currently supported under zero data retention (ZDR); Exa's Zero Data Retention page lists ZDR for Search, Contents, Agent, and Answer, but not Websets.

Frequently Asked Questions

How do I get notified when my Webset finishes?

Register an endpoint with POST https://api.exa.ai/websets/v0/webhooks and a body like {"url": "https://example.com/webhooks/exa", "events": ["webset.item.created", "webset.item.enriched", "webset.idle"]}. The response returns the signing secret once, so store it. webset.idle marks completion, webset.item.created and webset.item.enriched report progress, and monitor.run.completed covers later monitor runs (create a webhook, event types). The event identifies the item. Webhooks remove the need to poll, and polling the API or using exa.websets.wait_until_idle(id) (Python) or exa.websets.waitUntilIdle(id) (JavaScript) remains available.

Can a single job really discover thousands of entities?

Yes. A Webset's count is a target, and Exa's quickstart notes that requests for 1,000+ items scan a much larger candidate pool and take significantly longer than small websets. For very large or exhaustive targets, Exa recommends Agent Ultra, and you can also split the work across multiple Websets.

Do I have to write code?

No. The Websets Dashboard supports the full workflow visually: define the search, set criteria and enrichments, and watch results arrive. The API and SDKs are there when you want programmatic control, your own identifiers via externalId, or webhook-driven automation.

What entity types can Websets discover?

Websets items are companies, people, articles, research papers, and custom types. Each verified item includes the reasoning behind its selection and references, and can be enriched with fields such as contact details, funding amounts, or dates in text, date, number, options, email, phone, or url formats.

Conclusion

An async job that discovers thousands of web entities and notifies you on completion is not a pipeline you need to assemble from a search API, a scraper, a queue, and a cron job. In Exa Websets it is one create call: a natural-language query, a target count, your verification criteria, and your enrichments. Websets verifies every candidate, enriches each item, and pushes results to you via webhook, polling, or the dashboard, with wait_until_idle available when you want to block. Check your credit plan against your target size, preview your query before the full run, and start with the Websets quickstart to make your first call.

Related Articles