How to validate a phone number with ChatGPT, Claude, or any AI assistant

Last updated: Nov 11, 2026

To validate a phone number you need two answers: whether the digits form a real number for that country, and whether that number is currently assigned to a working line. The first is a formatting check you can run anywhere. The second needs carrier data. An AI assistant linked to Firecrawl Alexandria can fetch both from Trestle, a data provider for phone validation, with HLR Lookup added when you need a mobile number's network and, where the network answers, its live status.

Starter prompt

Swap in the number (with its country) and give this prompt to any Firecrawl-connected assistant:

Use Firecrawl Alexandria to validate [phone number, country] with
Trestle's phone validation tool. Tell me what each tool costs before
you run it.
 
Return:
- Whether the number is valid, in E.164 format
- The line type, carrier and whether it is prepaid
- The activity score and what it suggests about the line
- If it is a mobile number, its live status, current network and
  porting status from HLR Lookup
 
Only check business numbers or numbers I own. Don't try to find out
who the number belongs to.

What counts as a valid phone number?

A valid number matches its country's numbering plan and belongs to a line a carrier has assigned. A full answer covers four things:

  • Format. Whether the number has the right country code and length, written out in E.164 form (+18002752273).
  • Line type. Mobile, landline, fixed or non-fixed VoIP, toll-free, premium or voicemail. It tells you whether a text message is likely to reach the number.
  • Carrier. Which network issued the number, and for mobiles which network serves it today if it was ported.
  • Activity. Whether the line looks connected: Trestle's activity score for any number, or an HLR live status for a mobile.

Where to validate a phone number

SourceWhat you getThe catch
Dial the numberA ring, a voicemail or a disconnected-number messageOne number at a time, and it interrupts whoever answers
Google's libphonenumber libraryParsing, formatting and a numbering-plan validity check for numbers worldwideIts own FAQ says not to rely on it to tell whether a number is assigned to someone and reachable
An AI assistant with Firecrawl AlexandriaValidity, line type, carrier, prepaid flag, activity score and HLR live statusUses Firecrawl credits per lookup

How to validate a phone number with AI, step by step

  1. Link your assistant. Any MCP client works, Claude, ChatGPT, Cursor and Claude Code included, and the setup for each follows.
  2. Give the full number. Include the country code, or name the country. Trestle reads a bare 10-digit number as North American by default, so a UK or Indian number without its prefix can be misread.
  3. Say which checks you want. Trestle covers validity, line type and carrier for any number. Add HLR Lookup when the number is a mobile and you want to know whether it is live on the network right now.
  4. Look at the line type before you act. A landline result means a text may not arrive, and an activity score of 30 or below points to a disconnected line.

What data can you get?

Firecrawl Alexandria has three tools for this job, from two providers:

ToolWhat it returnsCredits per call
Trestle phone validationWhether the number is valid, the E.164 form, country, line type (landline, mobile, fixed or non-fixed VoIP, premium, toll-free, voicemail), carrier, prepaid flag and a 0 to 100 activity score. Optional TCPA litigator check15, or 20 when the litigator check is returned
HLR Lookup live statusFor mobiles: live status (such as LIVE, DEAD or ABSENT_SUBSCRIBER), the network that issued the number and the one serving it now, whether it was ported, and the number type15; 30 for a US mobile with the US status option; 0 for landlines and bad formats
HLR Lookup networkThe current network and porting status, without checking whether the line is live5; 0 for numbers outside coverage and bad formats

On Nov 11, 2026, we ran Apple's published US support line, 1-800-275-2273, through both tools:

  • Trestle: valid, line type TollFree, carrier "Infobip TFN - Toll-Free - Zipwhip", not prepaid, with an activity score of 100 and no warnings
  • HLR Lookup: a toll-free number, never ported, with no live status, since toll-free lines sit outside mobile HLR

How to validate a phone number in Claude

  1. Press Connect on the Firecrawl connector listing.
  2. Log into your Firecrawl account, or make a free one right there, then pick a team and approve the request.
  3. Start a chat, click +, open Connectors and toggle Firecrawl on.

A request can be as short as this:

Use Firecrawl Alexandria to run our support line, [number], through
Trestle's phone validation. Is it a valid number, what line type is
it, and does the activity score say it's connected?

How to validate a phone number in ChatGPT

  1. Get the Firecrawl plugin for ChatGPT.
  2. Approve the Firecrawl sign-in that ChatGPT shows you, or sign up if you're new.
  3. Type @firecrawl at the very start of your message to send it through the plugin.
@firecrawl Run this mobile number through HLR Lookup in Firecrawl
Alexandria: [number with country code]. Is it live, and was it ported?

How to validate a phone number in Claude Code, Cursor and other AI agents

Agents that speak MCP get Firecrawl Alexandria from Firecrawl's MCP server. Add it, then approve the Firecrawl login that pops up in your browser.

  • Claude Code: claude mcp add --transport http firecrawl https://mcp.firecrawl.dev/v2/mcp-oauth adds the server; sign in afterwards from /mcp.
  • Cursor, or any client configured through JSON: put this block in the MCP config file.
{
  "mcpServers": {
    "firecrawl": {
      "url": "https://mcp.firecrawl.dev/v2/mcp-oauth"
    }
  }
}

Three tools become available. firecrawl_search with sources: ["alexandria"] locates providers such as Trestle, firecrawl_find_tools lists a tool's options (add includeCosts: true to see the credit price as well), and firecrawl_scrape executes the lookup.

How to validate a phone number with the Firecrawl API

For sign-up forms, CRM imports or a lead list, call the tools from Python after running pip install firecrawl-py:

from firecrawl import Firecrawl
 
app = Firecrawl(api_key="fc-YOUR_API_KEY")
 
def provider_data(result):
    item = result.alexandria[0]
    if item.error:  # a provider can fail without returning data
        raise RuntimeError(f"{item.provider}: {item.error.code} {item.error.message}")
    return item.data
 
# Trestle: validity, line type, carrier, activity score. 15 credits
trestle = app.scrape(
    alexandria={
        "provider": "trestleiq",
        "capability": "phones/validate",
        "options": {"phone": "18002752273", "phone.country_hint": "US"},
    }
)
phone = provider_data(trestle)
print(phone["is_valid"], phone["line_type"], phone["activity_score"])
 
# HLR Lookup: live status for a mobile, in E.164 digits without the +.
# 15 credits; 0 when the number is a landline or badly formatted
mobile = "44XXXXXXXXXX"  # replace with a business mobile number
hlr = app.scrape(
    alexandria={
        "provider": "hlrlookup",
        "capability": "people/phone-verify",
        "options": {"telephone_number": mobile},
    }
)
result = provider_data(hlr)["results"][0]
print(result["live_status"], result["is_ported"])

Firecrawl Alexandria calls need an API key from your Firecrawl account; keyless access doesn't include them. The Firecrawl docs list the options for every tool.

What it costs

Searching for these tools and seeing their prices costs nothing, whichever setup you use. Every lookup draws Firecrawl credits at the rates above, and your assistant tells you the tool it picked and the credit total. Validating one mobile number with Trestle and then an HLR live status check comes to 30 Firecrawl credits, or 45 for a US mobile with the US status option. A landline through Trestle alone is 15. Prices can change; see Firecrawl pricing for plans.

Limits to know

  • HLR covers mobiles only. Landlines come back as NO_COVERAGE and results for VoIP numbers are limited, so lean on Trestle's line type and activity score for those. Some networks answer with NOT_AVAILABLE_NETWORK_ONLY in place of a live status, and that lookup is still charged.
  • No consent or do-not-call check. None of these tools tells you whether you have consent to call or text a number or whether it is on a do-not-call list, and Trestle's litigator flag is not a TCPA compliance check. For do-not-call status, sellers and telemarketers in the US access the National Do Not Call Registry through telemarketing.donotcall.gov, where the FTC lets them download up to five area codes for free and requires them to refresh their lists at least every 31 days.
  • Not a consumer report. Trestle's tool description in Firecrawl Alexandria rules out using its data for credit, insurance, employment, housing or benefits decisions, or for automated decisions with legal effects.

Related guides

Use Firecrawl in your agent

Add Firecrawl to ChatGPT, Claude, Cursor and more in one click.

Frequently Asked Questions

How do I validate a phone number?

Start by checking that the number fits its country's numbering plan, then ask a data provider whether it is assigned and in use. An AI assistant with Firecrawl Alexandria connected sends the number to Trestle, which returns whether it is valid, its line type, its carrier and a 0 to 100 activity score, and to HLR Lookup for a mobile number's network and, when the network answers, its live status.

What does a phone number validator check?

A basic validator only checks length and digits against the numbering plan. A data-backed one like Trestle also reports the line type (mobile, landline, fixed or non-fixed VoIP, toll-free and others), the carrier, whether the line is prepaid, and an activity score where 70 or above suggests the number is likely connected and 30 or below suggests it is likely disconnected.

What is an HLR lookup?

HLR stands for Home Location Register, the database a mobile network keeps on its subscribers. An HLR lookup asks the network whether a mobile number is live, which network serves it today and whether it was ported from another carrier. It only works for mobile numbers, so HLR Lookup in Firecrawl Alexandria reports landlines as NO_COVERAGE.

Can a phone number lookup tell me who owns a number?

Not with the tools in this guide. Trestle's phone validation and HLR Lookup return network facts about the number itself, such as validity, line type, carrier, porting and live status. They do not return the name of the person behind it, and Trestle's data is not a consumer report, so it should not drive credit, insurance, employment, housing or benefits decisions.

How much does it cost to validate a phone number with Firecrawl?

There's no charge to discover the tools or see what they cost. Trestle's phone validation costs 15 Firecrawl credits, or 20 when a litigator check is requested and returned. HLR Lookup costs 15 Firecrawl credits for a live status check (30 for a US mobile with the US status option) and 5 for a network-only lookup, with landlines and badly formatted numbers free. Prices can change.

What is Firecrawl Alexandria?

Firecrawl Alexandria is Firecrawl's library of 400+ data providers that AI assistants and agents can call directly, from public sources and licensed publishers such as Fiscal.ai, Benzinga and Apollo to Firecrawl's own Research, Developer and Government indexes. Connect Firecrawl to ChatGPT, Claude, Cursor or another agent, and it finds the right provider for your question, shows the price of each tool and returns the record from the source. It needs a Firecrawl account, signed in through the connector, plugin or MCP sign-in, or an API key; keyless connections don't include it. Finding tools is free; running one uses Firecrawl credits.

//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options