Sign inGet Started

Get a phone number lookup by URL

GET
/v1/lookup/phone-number/{number}
curl -X GET "https://us1.platform.bird.com/v1/lookup/phone-number/{number}" \
  -H "Authorization: Bearer $TOKEN"
Antwort200
{
  "phone_number": "+441904123456",
  "country_code": "GB",
  "network_info": {
    "carrier_name": "BT",
    "mcc": "234",
    "mnc": "00"
  },
  "original_network_info": null,
  "flags": [],
  "line_type": "service",
  "classification": {
    "status": "ok",
    "value": "premium_rate"
  },
  "score": {
    "status": "ok",
    "value": 48
  },
  "presence": {
    "status": "ok",
    "reachable": true
  },
  "roaming": {
    "status": "unavailable"
  }
}

Performs the same lookup as Create a phone number lookup, with the number in the URL. The response includes the number's serving and issuing networks, porting state, country, and line type. Repeat type to request additional blocks, such as ?type=classification&type=score; only blocks with an ok status incur an additional charge.

Because the number is in the URL, it can appear in proxies, access logs, and browser history. This form does not accept an Idempotency-Key; each retry performs and charges for another lookup.

Parameter

numberstring

The number to look up, in international format. The leading + is optional, and 00 works in its place, so 31612345678 and +31612345678 are the same number, with nothing to percent-encode. If you do send the +, percent-encode it as %2B when your client does not do that for you.

Abfrageparameter

typearray

An additional data block to request. Repeat the parameter for multiple blocks; each block is billed separately only when its status is ok.

Antwort-Payload

phone_number
string
erforderlich

The number that was looked up, in E.164 format.

country_code
nullable string

The ISO 3166-1 alpha-2 country of the number. Absent when the number belongs to no single country, as a non-geographic range does.

network_info
nullable object

The network that serves the number today. Absent when no network could be identified.

Untergeordnete Attribute anzeigen
original_network_info
nullable object

The network that issued the number's range. It differs from network_info when the number has been ported. Absent when the issuing network could not be identified.

Untergeordnete Attribute anzeigen
flags
array of string
erforderlich

Notable characteristics of the number. Empty when none apply.

line_type
string
erforderlich

What kind of line the number is, as reported by the carrier platform.

This is included in every base lookup, regardless of which properties you request.

  • unknown: the carrier platform holds no classification for the range.
  • other: it holds a classification with no equivalent here.
  • m2m: a range reserved for machine-to-machine traffic, belonging to no individual subscriber.

For the allocated service of the range at finer precision, request the classification property. That answers from a different source, with its own wider vocabulary, and is reported separately so you can always tell the two apart.

Possible values: mobile, fixed_line, voip, toll_free, premium_rate, satellite, pager, payphone, m2m, service, other, unknown

classification
object

The allocated service of the number's range. Absent unless you requested the classification property.

Untergeordnete Attribute anzeigen
presence
object

Whether the number is live on its network. Absent unless you requested the presence property.

Untergeordnete Attribute anzeigen
presence.status
string
erforderlich

How a requested property resolved.

  • ok: the property was answered and its value is in the response.
  • unavailable: no answer arrived, so the property adds nothing: its block is null, or for classification, line_type retains the value from the base lookup. The property is not billed.
  • inconclusive: an answer arrived but does not resolve the property, either because the number is outside the coverage of the data behind it or because the source returned a value this property does not report. It is a real answer rather than a missing one, and it is not billed either.

Open enum: further statuses may be added over time, so treat an unrecognized value as a future one rather than an error. Only ok carries a value and only ok is billed, so branching on ok and treating everything else as "not answered" stays correct however the vocabulary grows.

Possible values (may grow over time): ok, unavailable, inconclusive

presence.reachable
boolean

Whether the number is registered on a network and able to receive traffic. A false value means the network answered and reported the number as currently unreachable. This differs from the API being unable to find out. Present only when status is ok.

roaming
object

Whether the number is roaming. Absent unless you requested the roaming property.

Untergeordnete Attribute anzeigen
sim_swap
object

When the number's SIM last changed. Absent unless you requested the sim_swap property.

Untergeordnete Attribute anzeigen
porting
object

The number's porting record. Absent unless you requested the porting property.

Untergeordnete Attribute anzeigen
score
object

The number's credibility score. Absent unless you requested the score property.

Untergeordnete Attribute anzeigen

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.