<!--
{
  "availability" : [
    "MapKit JS: 5.45.0 - 6.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/PointsOfInterestSearch/search1",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instm/mapkit.PointsOfInterestSearch/search1"
  },
  "title" : "search(callback, options)"
}
-->

# search(callback, options)

Fetches points of interest.

```
search(
    callback: PointsOfInterestSearchDelegate,
    options?: PointsOfInterestSearchOptions,
): Promise<PointsOfInterestSearchResponse>;
```

## Parameters

`callback`

A callback function or delegate object with the following parameters:

- `error` (`Error`): An error code and descriptive message.
- `data` ([`PointsOfInterestSearchResponse`](/documentation/MapKitJS/PointsOfInterestSearchResponse)): The search response object.

`options`

A [`PointsOfInterestSearchOptions`](/documentation/MapKitJS/PointsOfInterestSearchOptions) object.

## Return Value

A promise that resolves with a [`PointsOfInterestSearchResponse`](/documentation/MapKitJS/PointsOfInterestSearchResponse) on success.

## Discussion

The [`search(callback, options)`](/documentation/MapKitJS/PointsOfInterestSearch/search1) method returns a set of points of interest within the region defined and matching the [`PointOfInterestFilter`](/documentation/MapKitJS/PointOfInterestFilter).

MapKit JS invokes the `callback` function on failure and success with two arguments, `error` and `data` that represent failure and success information, respectively. You may optionally provide a delegate object instead of a callback. If you call [`cancel(promise)`](/documentation/MapKitJS/Service/cancel) before MapKit JS responds, the system doesn’t call the callback or delegate.

---

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)