---
title: "search(callback, options)"
framework: mapkitjs
role: symbol
role_heading: Instance Method
path: mapkitjs/pointsofinterestsearch/search1
---

# search(callback, options)

Fetches points of interest.

## Declaration

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

## Parameters

- `callback`: A callback function or delegate object with the following parameters:
- `options`: A doc://com.apple.mapkitjs/documentation/MapKitJS/PointsOfInterestSearchOptions object.

## Return Value

Return Value A promise that resolves with a PointsOfInterestSearchResponse on success.

## Discussion

Discussion The search(callback, options) method returns a set of points of interest within the region defined and matching the 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) before MapKit JS responds, the system doesn’t call the callback or delegate.
