Phone Number Validator API - Dart/Flutter Client
Phone Number Validator checks a phone number and returns whether it is valid, its line type, country, area and time zone, and the carrier its mobile range was allocated to. It flags disposable and VoIP numbers and outputs E.164, international, national and RFC3966 formats.
This is the Dart/Flutter client for the Phone Number Validator API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_phonenumbervalidator: ^1.2.5
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_phonenumbervalidator/apiverve_phonenumbervalidator.dart';
void main() async {
final client = PhonenumbervalidatorClient('YOUR_API_KEY');
try {
final response = await client.execute({
'number': '816-555-1017',
'country': 'us'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"country": "US",
"detectedCountry": "US",
"countryName": "United States",
"countrycode": 1,
"numberNational": 8165551017,
"extension": null,
"isValid": true,
"isMobile": true,
"isVoip": false,
"isDisposable": false,
"type": "fixed_line_or_mobile",
"isValidNumber": true,
"nationalSignificantNumber": "8165551017",
"location": "Missouri",
"carrier": null,
"timezones": [
"America/Chicago"
],
"formatted": {
"international": "+1 816-555-1017",
"national": "(816) 555-1017",
"rfc": "tel:+1-816-555-1017",
"e164": "+18165551017"
},
"riskScore": 0,
"riskLevel": "low"
}
}
API Reference
- API Home: Phone Number Validator API
- Documentation: docs.apiverve.com/ref/phonenumbervalidator
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_phonenumbervalidator
- Phone Number Validator API client for Dart/Flutter