---
title: "Cancel a running Search"
method: POST
path: "/v0/websets/{webset}/searches/{id}/cancel"
tags: ["Searches"]
---

# Cancel a running Search

`POST /v0/websets/{webset}/searches/{id}/cancel`

## Request

- Base URL: `https://api.exa.ai/websets`
- URL: `https://api.exa.ai/websets/v0/websets/{webset}/searches/{id}/cancel`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Cancels a currently running Search.

You can cancel all searches at once by using the `websets/:webset/cancel` endpoint.

## Path parameters

- `webset` string, required
- `id` string, required

## Response `200`

Search canceled

- WebsetSearch
  - `id` string, required: The unique identifier for the search
  - `object` 'webset_search', required: The type of object
  - `websetId` string, required: The unique identifier for the Webset this search belongs to
  - `status` 'created' | 'pending' | 'running' | 'completed' | 'canceled', required: The status of the search
  - `query` string, required: The query used to create the search.
  - `entity` union, required
    - CompanyEntity
      - `type` 'company', required
    - PersonEntity
      - `type` 'person', required
    - ArticleEntity
      - `type` 'article', required
    - ResearchPaperEntity
      - `type` 'research_paper', required
    - CustomEntity
      - `description` string, required
      - `type` 'custom', required
  - `criteria` object[], required: The criteria the search will use to evaluate the results. If not provided, we will automatically generate them for you.
    - `description` string, required: The description of the criterion
    - `successRate` number, required: Value between 0 and 100 representing the percentage of results that meet the criterion.
  - `count` number, required: The number of results the search will attempt to find. The actual number of results may be less than this number depending on the search complexity.
  - `maxPeoplePerCompany` integer, nullable, required: The soft cap requested for matching people from the same current employer company, or null when no cap was requested.
  - `behavior` 'override' | 'append'
  - `exclude` object[], required: Sources (existing imports or websets) used to omit certain results to be found during the search.
    - `source` 'import' | 'webset', required
    - `id` string, required
  - `scope` object[], required: Sources the search is limited to. Empty when the search covers the whole web.
    - `source` 'import' | 'webset', required
    - `id` string, required
    - `relationship` object
      - `definition` string, required: What the relationship of the entities you hope to find is relative to the entities contained in the provided source.
      - `limit` number, required
  - `progress` object, required: The progress of the search
    - `found` number, required: The number of results found so far
    - `analyzed` number, required: The number of results analyzed so far
    - `completion` number, required: The completion percentage of the search
    - `timeLeft` number, nullable, required: The estimated time remaining in seconds, null if unknown
  - `recall` object, nullable, required: Recall metrics for the search, null if not yet computed or requested.
    - `expected` object, required
      - `total` number, required: The estimated total number of potential matches
      - `confidence` 'high' | 'medium' | 'low', required: The confidence in the estimate
      - `bounds` object, required
        - `min` number, required: The minimum estimated total number of potential matches
        - `max` number, required: The maximum estimated total number of potential matches
    - `reasoning` string, required: The reasoning for the estimate
  - `metadata` object: Set of key-value pairs you want to associate with this object.
  - `canceledAt` string, date-time, nullable, required: The date and time the search was canceled
  - `canceledReason` 'webset_deleted' | 'webset_canceled' | 'out_of_credits', required
  - `createdAt` string, date-time, required: The date and time the search was created
  - `updatedAt` string, date-time, required: The date and time the search was updated

## Changes

- **2026-09-13** `068993f25c35`: 1 info
  - added 'propertyNames' constraint to the `metadata` response property for the status `200`
- **2026-06-07** `25384fdd189e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/exa/apis/exa-public-api/changes/v0/websets/:webset/searches/:id/cancel/post.md)

---

[API](https://skmtc.dev/exa/apis/exa-public-api.md) - [All operations](https://skmtc.dev/exa/apis/exa-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exa/apis/exa-public-api/revisions/9fa4de48c6af?raw)
