> For AI agents: the complete documentation index is available at /core-sdk/map/web/llms.txt, the full documentation bundle is available at /core-sdk/map/web/llms-full.txt.

# Search POIs within a Building

```js
// Sample Usage
const service = new MapxusMap.PoisService();

service.searchByBuilding(
    {
	    keywords: 'starbucks',
        buildingId: 'elements_hk_dc005f'
    }
);
```

**Parameters**

| Parameter | Type                     | Description                                          |
| --------- | ------------------------ | ---------------------------------------------------- |
| options   | ISearchByBuildingOptions | \{ buildingId, keywords?, orderBy?, offset?, page? } |

- **buildingId**(type string, required): Building ID.
- **keywords**(type string, optional): POI name keyword.
- **orderBy**(type MapxusMap.PoisOrderBy, optional): POIs' order, **cannot be used with 'keywords' at the same time**. Available values: MapxusMap.PoisOrderBy.DEFAULT\_NAME
- **offset**(type number, optional): Quantity per page, the maximum is 100, default is 10.
- **page**(type number, optional): Results for specified page number. Default is 1.

> **Special Note:** The parameter 'offset' has limitations, the maximum value for each request must not exceed **100**. If you need to request more than 100 records of data, please make paginated requests.

**Returns** `TPromisePois<IPoi>`
IPoi:

- floor
- floorId
- accessibilityDetail
- category
- descriptions
- distance?
- id
- location
- name
- osmRefId
- poiId
- buildingId
- venueId

Sample web page:

<iframe src="https://map-service.mapxus.com/bssww/poiSearchByBuildingId" width="100%" height="550px"></iframe>
