# searchPostOffices

Source: https://pakdatakit.dev/api/typescript/postal/functions/searchpostoffices/

```ts
function searchPostOffices(query): PostOffice[];
```

Defined in: [post-offices.ts:66](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/post-offices.ts#L66)

Searches Pakistan Post's directory by office name, town or post code.

Matching is case-insensitive: an office matches when its name or town
contains the query, or its code starts with it.

## Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `query` | `string` | Partial office name, town or post code |

## Returns

[`PostOffice`](https://pakdatakit.dev/api/typescript/postal/interfaces/postoffice/)[]

Matching post offices, sorted by post code
