---
title: "Your first number lookup"
description: "Send an LRN request using your existing SIP account."
---

## Prepare your request

You need your main SIP account API key and a telephone number to look up. Save the key locally as `A1ROUTES_API_KEY` and the number as `TELEPHONE_NO`.

### cURL

```bash
curl --fail-with-body --get \
  "https://control.a1routes.com/api/lookup/lrn" \
  --data-urlencode "api_key=$A1ROUTES_API_KEY" \
  --data-urlencode "extended=true" \
  --data-urlencode "tn=$TELEPHONE_NO"
```

### Node.js

```javascript
const url = new URL(`https://control.a1routes.com/api/lookup/lrn`);
url.searchParams.set('api_key', process.env.A1ROUTES_API_KEY);
url.searchParams.set('extended', "true");
url.searchParams.set('tn', process.env.TELEPHONE_NO);
const response = await fetch(url, {
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.text());
```

### Python

```python
import os
import requests
url = f"https://control.a1routes.com/api/lookup/lrn"
response = requests.get(
    url,
    params={
        "api_key": os.environ["A1ROUTES_API_KEY"],
        "extended": "true",
        "tn": os.environ["TELEPHONE_NO"],
    },
    timeout=30,
)
response.raise_for_status()
print(response.text)
```

### PHP

```php
<?php
$url = 'https://control.a1routes.com/api/lookup/lrn';
$url .= '?' . http_build_query([
    'api_key' => getenv('A1ROUTES_API_KEY'),
    'extended' => 'true',
    'tn' => getenv('TELEPHONE_NO'),
]);
$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
if ($body === false) throw new RuntimeException(curl_error($ch));
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) throw new RuntimeException('HTTP ' . $status);
echo $body;
```

## Inspect the result

Check the HTTP status and content type before parsing the body.

Sample JSON output for an extended LRN lookup (`extended=true`):

```json
{
  "CITY": "RAMSEY",
  "code": 200,
  "LINETYPE": "WIRELESS",
  "DNC": "",
  "OCN": "4036",
  "COUNTRY": "",
  "LOOKUP_TYPE": "EXTENDED",
  "JURISDICTION": "INDETERMINATE",
  "NUMBER": "12014667482",
  "LRN": "12014667482",
  "STATE": "NJ",
  "LEC": "NEW CINGULAR WIRELESS PCS, LLC - DC",
  "LATA": "224",
  "SPID": "",
  "msg": "Operation successful",
  "type": "+OK"
}
```

This example shows a successful lookup. Values vary by telephone number. Keep telephone numbers and identifiers as strings, and preserve field-name capitalization. Some fields can be empty strings, as shown for `DNC`, `COUNTRY`, and `SPID`; do not interpret an empty value as a negative result. The `code` field is part of the JSON body; check the HTTP status separately.

## Next steps

Read the [LRN endpoint reference](/docs/lookup/lrn), [authentication guide](/docs/authentication), and [error handling guidance](/docs/errors).
