# scoreAddress

Source: https://pakdatakit.dev/api/typescript/quality/functions/scoreaddress/

```ts
function scoreAddress(input): AddressScore;
```

Defined in: [quality.ts:157](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/quality.ts#L157)

Scores how complete a free-form Pakistani delivery address is, for cash on
delivery and other courier use.

Built on [parseAddress](https://pakdatakit.dev/api/typescript/address/functions/parseaddress/). It looks for a city, a house, plot or flat
number, a street, an area, a postal code and a landmark ("near", "opp",
"nazd", "qareeb", "سامنے" …), and adds up [ADDRESS\_WEIGHTS](https://pakdatakit.dev/api/typescript/quality/variables/address_weights/). A postal
code that is a known post office raises the score more than an unknown
one, and a post office in a different province from the city lowers it
(with a warning in `parsed.warnings`).

This is a heuristic: it says how much an address tells a rider, not whether
the address exists. It never throws.

## Parameters

| Parameter | Type |
| :------ | :------ |
| `input` | `string` |

## Returns

[`AddressScore`](https://pakdatakit.dev/api/typescript/quality/interfaces/addressscore/)

## Example

```ts
scoreAddress('House 12, Street 4, Block B, Gulberg III, near Liberty Market, Lahore 54660');
// { score: 100, missing: [], parsed: { … } }
```
