---
title: "Look up a number"
description: "Retrieve LRN information for a telephone number using your main SIP account API key."
---

## Request

Retrieve LRN information for a telephone number using your main SIP account API key.

`GET /lookup/lrn`

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `tn` | string | Yes | Telephone number to look up. Use the number format enabled for your account. |
| `extended` | boolean | No | Request extended lookup information. The example uses true. |

## Examples

### 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;
```

## Response

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.

## Integration notes

Use your main SIP account key, not an A1PBX key. `extended=true` requests additional data; do not assume every number has every field. Confirm number-format requirements, usage charges, and request limits with support.

See [authentication](/docs/authentication), [pagination](/docs/pagination), and [error handling](/docs/errors).
