> 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 Building within an Area

The building search service is used to search for a building in Mapxus Map.

```js
// Sample Usage
const service = new MapxusMap.BuildingsService();
const keywords = 'elements';
const bbox = [
	114.15709623420952,
	22.293868759302995,
	114.17050186124692,
	22.308570524727344
];
service.searchByBbox({bounds, keywords});
```

**Parameters**

| Parameter | Type                   | Description                            |
| --------- | ---------------------- | -------------------------------------- |
| options   | ISearchByBoundsOptions | \{ bounds, keywords?, offset?, page? } |

- **bounds**(type \[\[number, number], \[number, number]], required): rectangular range of the searching area, in the format of \[\[min\_lon, min\_lat], \[max\_lon, max\_lat]].
- **keywords**(type string, optional): keywords of the building name.
- **offset**(type number, optional): quantity per request, default is 10.
- **page**(type number, optional): 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** `TPromiseBuildings`
IBuilding:

- address
- bbox
- city?
- country
- description
- labelCenter
- name
- region
- type
- buildingId
- buildingName
- buildingOutlineId
- defaultFloor?
- floors
- groundFloor
- isPrivate
- organization
- venueId
- venueName

Sample web page:

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