> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/websets_polling.md).

# Exa Websets Polling

Blocks for polling and waiting on Exa webset operations to complete.

## Exa Wait For Enrichment

### What it is

Wait for a webset enrichment to complete with progress tracking

### How it works

This block polls the enrichment, starting every `check_interval` seconds (default 5) and backing off by 1.5x up to 30, until it is completed, failed or canceled, or `timeout` (default 300, max 1800) passes. On timeout it returns the last status with `timed_out` true instead of failing.

`items_enriched` and `sample_data` come from the webset's first 5 items only, and only when `sample_results` is on and the enrichment completed; otherwise `items_enriched` is 0. It charges only if Exa's response reports a cost (150 credits per USD).

### Inputs

| Input           | Description                                       | Type | Required |
| --------------- | ------------------------------------------------- | ---- | -------- |
| webset\_id      | The ID or external ID of the Webset               | str  | Yes      |
| enrichment\_id  | The ID of the enrichment to monitor               | str  | Yes      |
| timeout         | Maximum time to wait in seconds                   | int  | No       |
| check\_interval | Initial interval between status checks in seconds | int  | No       |
| sample\_results | Include sample enrichment results in output       | bool | No       |

### Outputs

| Output            | Description                            | Type                         |
| ----------------- | -------------------------------------- | ---------------------------- |
| error             | Error message if the operation failed  | str                          |
| enrichment\_id    | The enrichment ID that was monitored   | str                          |
| final\_status     | The final status of the enrichment     | str                          |
| items\_enriched   | Number of items successfully enriched  | int                          |
| enrichment\_title | Title/description of the enrichment    | str                          |
| elapsed\_time     | Total time elapsed in seconds          | float                        |
| sample\_data      | Sample of enriched data (if requested) | List\[SampleEnrichmentModel] |
| timed\_out        | Whether the operation timed out        | bool                         |

### Possible use case

**Sequential Processing**: Wait for enrichments to complete before proceeding to export or analysis.

**Data Validation**: Ensure enrichments finish and review samples before continuing workflow.

**Synchronous Workflows**: Convert async enrichment operations to blocking calls for simpler logic.

***

## Exa Wait For Search

### What it is

Wait for a specific webset search to complete with progress tracking

### How it works

This block polls the search, starting every `check_interval` seconds (default 5) and backing off by 1.5x up to 30, until it is completed, failed or canceled, or `timeout` (default 300, max 1800) passes. It returns items found, items analyzed, completion percentage and, once the search has finished, the recall estimate.

On timeout it returns the last known progress with `timed_out` true instead of failing. It charges only if Exa's response reports a cost (150 credits per USD).

### Inputs

| Input           | Description                                       | Type | Required |
| --------------- | ------------------------------------------------- | ---- | -------- |
| webset\_id      | The ID or external ID of the Webset               | str  | Yes      |
| search\_id      | The ID of the search to monitor                   | str  | Yes      |
| timeout         | Maximum time to wait in seconds                   | int  | No       |
| check\_interval | Initial interval between status checks in seconds | int  | No       |

### Outputs

| Output                 | Description                                       | Type            |
| ---------------------- | ------------------------------------------------- | --------------- |
| error                  | Error message if the operation failed             | str             |
| search\_id             | The search ID that was monitored                  | str             |
| final\_status          | The final status of the search                    | str             |
| items\_found           | Number of items found by the search               | int             |
| items\_analyzed        | Number of items analyzed                          | int             |
| completion\_percentage | Completion percentage (0-100)                     | int             |
| elapsed\_time          | Total time elapsed in seconds                     | float           |
| recall\_info           | Information about expected results and confidence | Dict\[str, Any] |
| timed\_out             | Whether the operation timed out                   | bool            |

### Possible use case

**Search Completion**: Wait for initial webset population before accessing items.

**Progress Monitoring**: Track search progress in long-running operations.

**Sequential Workflows**: Ensure searches complete before starting enrichments.

***

## Exa Wait For Webset

### What it is

Wait for a webset to reach a specific status with progress tracking

### How it works

This block polls a webset until it reaches the target status. For 'idle' (the default) and the legacy 'completed' and 'any\_complete', it checks the webset every `check_interval` seconds until it is idle; if it is not idle within `timeout` (default 300, max 1800), the run fails with a timeout error. For 'running' or 'paused' it backs off by 1.5x up to `max_interval` and, on timeout, returns the last status with `timed_out` true.

It returns the final status, elapsed time, the number of items found by the webset's searches and, with `include_progress` on, per-search progress and per-enrichment status. It charges only if Exa's response reports a cost (150 credits per USD).

### Inputs

| Input             | Description                                                                                                                                                | Type                                                              | Required |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -------- |
| webset\_id        | The ID or external ID of the Webset to monitor                                                                                                             | str                                                               | Yes      |
| target\_status    | Status to wait for: idle (all operations complete), running (actively processing) or paused. 'completed' and 'any\_complete' are legacy and wait for idle. | "idle" \| "completed" \| "running" \| "paused" \| "any\_complete" | No       |
| timeout           | Maximum time to wait in seconds                                                                                                                            | int                                                               | No       |
| check\_interval   | Initial interval between status checks in seconds                                                                                                          | int                                                               | No       |
| max\_interval     | Maximum interval between checks (for exponential backoff)                                                                                                  | int                                                               | No       |
| include\_progress | Include detailed progress information in output                                                                                                            | bool                                                              | No       |

### Outputs

| Output               | Description                              | Type            |
| -------------------- | ---------------------------------------- | --------------- |
| error                | Error message if the operation failed    | str             |
| webset\_id           | The webset ID that was monitored         | str             |
| final\_status        | The final status of the webset           | str             |
| elapsed\_time        | Total time elapsed in seconds            | float           |
| item\_count          | Number of items found                    | int             |
| search\_progress     | Detailed search progress information     | Dict\[str, Any] |
| enrichment\_progress | Detailed enrichment progress information | Dict\[str, Any] |
| timed\_out           | Whether the operation timed out          | bool            |

### Possible use case

**Workflow Orchestration**: Wait for all webset operations to complete before next workflow steps.

**Idle State Detection**: Ensure webset is fully idle before making configuration changes.

**Completion Gates**: Block workflow until webset reaches a specific readiness state.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/websets_polling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
