<!--
{
  "availability" : [
    "MapKit JS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/SearchOptions/signal",
  "metadataVersion" : "0.1.0",
  "role" : "Interface Property",
  "symbol" : {
    "kind" : "Interface Property",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "structp/mapkit.SearchOptions/signal"
  },
  "title" : "signal"
}
-->

# signal

A signal object allowing you to cancel the request.

```
signal?: AbortSignal;
```

## Discussion

Pass an `AbortSignal` from an `AbortController` to allow the controller to cancel a pending search or autocomplete request. When the controller aborts, the promise it returns rejects with a `DOMException` whose `name` is `"AbortError"`.

```javascript
const controller = new AbortController();
const search = new mapkit.Search();

try {
    const data = await search.search("coffee", { signal: controller.signal });
    // Handle results.
} catch (error) {
    if (error.name === "AbortError") {
        // The request was canceled.
    }
}

// Cancel the request at any time:
controller.abort();
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)