# Handling messy data

Entity names arrive embedded in legal documents, concatenated with tax IDs, or in mixed scripts. Examples of inputs Entity Resolution parses, and how to phrase a query.

Entity names rarely arrive clean. They come embedded in legal documents, concatenated with addresses and tax IDs, or in mixed scripts. Pass them as they are. Entity Resolution parses the name out rather than requiring you to pre-clean it.

## Inputs we parse

### Former and alternate names

```text
name:     Federal Realty OP LP f/k/a Federal Realty Investment Trust
location: 909 Rose Avenue Suite 200 Rockville, MD 20852
```

`f/k/a` and `d/b/a` references are researched historically to connect current and previous legal structures.

### Name concatenated with address

```text
name:     Meridian 1674, LLC 1111 Brickell Ave Suite 2175 Miami, FL 33131
location: 1111 Brickell Ave Suite 2175 Miami, FL 33131
```

### Name mixed with tax IDs and registration numbers

```text
name:     ARAMEX BAHRAIN W.L.L. VAT NO : 200000724100002 P.O.BOX 26951
location: BAHRAIN
```

```text
name:     FORD MOTOR COMPANY CHILE SPA R.U.T.-.C.L. 787039103
location: Chile
```

### Contextual references, no location

```text
name:     Fastenal HQ
```

### Non-Latin scripts

```text
name:     株式会社ソニー (Sony Corporation)
location: Tokyo, Japan
```

### Multi-jurisdictional legal forms

```text
name:     Toyota Motor Europe NV/SA
location: Brussels
```

## Phrasing a query

`name`, `location` and `context` go in the JSON body.

```bash
curl -X POST 'https://api.savvyiq.ai/v3/entity-resolution/async' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'content-type: application/json' \
  -d '{"name": "Acme Inc.", "location": "CA, US", "context": "industrial fasteners"}'
```

**Include the country in `location`.** `CA` alone is ambiguous between California and Canada. `CA, US` is not.

Everything else is optional. A bare name resolves; a name plus location resolves better; `context` (what the company does, who its customers are) is what separates two companies that share a name. It never overrides registry evidence. When a query stays ambiguous, the response's `actions[]` names what to add. See [Understanding API responses](/docs/handling-responses).
