# Phone Number Lookup Service

### Features of phone number Lookup:

1. **Number Validation**: Confirms if the provided phone number is valid.
2. **Country Code Identification**: Determines the international country dialing code.
3. **National Number Format**: Provides the phone number in a national format.
4. **Carrier Information**: Identifies the carrier service associated with the phone number.
5. **Regional Identification**: Pinpoints the country or region of the phone number's registration.

## This service is essential for enterprises looking to verify user contact details, enhance customer data, and improve communication strategies.

<mark style="color:green;">`POST`</mark> `https://api.localmail.io/v1/lookup/phone-number`

#### Request Body

| Name                                            | Type   | Description                                                                                                                                                      |
| ----------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| phone\_number<mark style="color:red;">\*</mark> | String | Format: Should be in E.164 formatting for international numbers, which includes a + followed by the country code and the national number. Example: "+1234567890" |

{% tabs %}
{% tab title="200: OK " %}

```
{
  "original_number": "+91XXXXXXXXXX",
  "country_code": 91,
  "national_number": "XXXXXXXXXX",
  "is_valid": true,
  "carrier": "Example Carrier",
  "region": "Example Country"
}
```

{% endtab %}
{% endtabs %}

### Response Format

The API responds with a JSON object providing detailed information about the queried phone number:

* `original_number`: The original phone number queried.
* `country_code`: International country dialing code.
* `national_number`: National format of the phone number.
* `is_valid`: Boolean indicating if the phone number is valid.
* `carrier`: Name of the phone carrier.
* `region`: Country or region where the phone number is registered.

### Error Responses

* **400 Bad Request**: Invalid phone number format or missing data in the request.
* **401 Unauthorized**: Access token is missing or invalid.
* **404 Not Found**: Phone number not found in the database.
* **500 Internal Server Error**: Unexpected server error.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.localmail.io/localmail-insights-lookup/phone-number-lookup-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
