Mobile networks
import { getNetwork } from 'pakdatakit/networks'
Reads the 03XX prefix of a mobile number and returns the operator that prefix was originally allocated to. It accepts the same forms as the phone helpers: 03…, +92…, 0092…, with spaces or dashes.
getNetwork() Known prefix
- Original network
- Jazz
The network the prefix was originally allocated to. With number portability, the current carrier may differ.
Examples
Section titled “Examples”import { getNetwork } from 'pakdatakit';
getNetwork('0300 1234567');// → 'Jazz'
getNetwork('+92 345 1234567');// → 'Telenor'
getNetwork('042-35761234');// → 'Unknown'from pakdatakit import get_network
get_network('0300 1234567')# → 'Jazz'
get_network('+92 345 1234567')# → 'Telenor'
get_network('042-35761234')# → 'Unknown'import 'package:pakdatakit/pakdatakit.dart';
getNetwork('0300 1234567');// → NetworkName.jazz
getNetwork('+92 345 1234567');// → NetworkName.telenor
getNetwork('042-35761234');// → NetworkName.unknownusing PakDataKit;
Networks.GetNetwork("0300 1234567");// → "Jazz"
Networks.GetNetwork("+92 345 1234567");// → "Telenor"
Networks.GetNetwork("042-35761234");// → "Unknown"use PakDataKit\Networks;
Networks::getNetwork('0300 1234567');// → 'Jazz'
Networks::getNetwork('+92 345 1234567');// → 'Telenor'
Networks::getNetwork('042-35761234');// → 'Unknown'Reference
Section titled “Reference”getNetwork()
Section titled “getNetwork()”function getNetwork(phone: string): NetworkName;
type NetworkName = 'Jazz' | 'Zong' | 'Telenor' | 'Ufone' | 'SCO' | 'Unknown';Parameters. phone: the phone number to look up, in local or international form.
Returns the network name, or Unknown if the number is not a valid Pakistani mobile number.
Caveats.
- This is the network the prefix was originally allocated to. With number portability and operator mergers, the current carrier may differ.
Telenoris the operator the034xrange was originally allocated to. Telenor Pakistan was merged into PTML (Ufone) in 2026; the label is kept because the dataset records the original allocation.SCOis the Special Communications Organization (0355, serving Azad Jammu and Kashmir and Gilgit-Baltistan).0370and0371are labelled Zong from libphonenumber only; no official document giving037xto an operator was found.0372to0379are not included.0364(Instaphone, licence cancelled in 2008) is not included.
Data. PTA has no current operator-by-prefix table. The two-digit allocations come from PTA’s National Numbering Plan 2008, with individual prefixes cross-checked against Google libphonenumber and operator announcements.
Related: validatePhone(), analyzePhone().
Related
Section titled “Related”- Phone: validate and format mobile numbers.
- Numbers: landlines, UAN, toll-free numbers and area codes.
- WhatsApp: click-to-chat links.
- Quality: risk signals for a phone number given for a delivery.
- API reference