The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
Cloudmersive Validation API provides data validation capabilities for validating email addresses, phone numbers, IP addresses, and many other types of business data.
- API version: v1
- Package version: 3.0.1
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/cloudmersive/cloudmersive_validate_api_client.git"
}
],
"require": {
"cloudmersive/cloudmersive_validate_api_client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/cloudmersive_validate_api_client/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\AddressApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$input = new \Swagger\Client\Model\ValidateCountryRequest(); // \Swagger\Client\Model\ValidateCountryRequest | Input request
try {
$result = $apiInstance->addressCheckEUMembership($input);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AddressApi->addressCheckEUMembership: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://api.cloudmersive.com
Class | Method | HTTP request | Description |
---|---|---|---|
AddressApi | addressCheckEUMembership | POST /validate/address/country/check-eu-membership | Check if a country is a member of the European Union (EU) |
AddressApi | addressCountry | POST /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name |
AddressApi | addressCountryList | POST /validate/address/country/list | Get a list of ISO 3166-1 countries |
AddressApi | addressGeocode | POST /validate/address/geocode | Geocode a street address into latitude and longitude |
AddressApi | addressGetCountryCurrency | POST /validate/address/country/get-currency | Get the currency of the input country |
AddressApi | addressGetCountryRegion | POST /validate/address/country/get-region | Get the region, subregion and continent of the country |
AddressApi | addressGetTimezone | POST /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country |
AddressApi | addressNormalizeAddress | POST /validate/address/street-address/normalize | Normalize a street address |
AddressApi | addressParseString | POST /validate/address/parse | Parse an unstructured input text string into an international, formatted address |
AddressApi | addressReverseGeocodeAddress | POST /validate/address/geocode/reverse | Reverse geocode a lattitude and longitude into an address |
AddressApi | addressValidateAddress | POST /validate/address/street-address | Validate a street address |
AddressApi | addressValidateCity | POST /validate/address/city | Validate a City and State/Province combination, get location information about it |
AddressApi | addressValidatePostalCode | POST /validate/address/postal-code | Validate a postal code, get location information about it |
AddressApi | addressValidateState | POST /validate/address/state | Validate a state or province, name or abbreviation, get location information about it |
DateTimeApi | dateTimeGetNowSimple | GET /validate/date-time/get/now | Get current date and time as of now |
DateTimeApi | dateTimeGetPublicHolidays | POST /validate/date-time/get/holidays | Get public holidays in the specified country and year |
DateTimeApi | dateTimeParseNaturalLanguageDateTime | POST /validate/date-time/parse/date-time/natural-language | Parses a free-form natural language date and time string into a date and time |
DateTimeApi | dateTimeParseStandardDateTime | POST /validate/date-time/parse/date-time/structured | Parses a standardized date and time string into a date and time |
DomainApi | domainCheck | POST /validate/domain/check | Validate a domain name |
DomainApi | domainGetTopLevelDomainFromUrl | POST /validate/domain/url/get-top-level-domain | Get top-level domain name from URL |
DomainApi | domainIsAdminPath | POST /validate/domain/url/is-admin-path | Check if path is a high-risk or vulnerable server administration path |
DomainApi | domainPhishingCheck | POST /validate/domain/url/phishing-threat-check | Check a URL for Phishing threats |
DomainApi | domainPost | POST /validate/domain/whois | Get WHOIS information for a domain |
DomainApi | domainQualityScore | POST /validate/domain/quality-score | Validate a domain name's quality score |
DomainApi | domainSafetyCheck | POST /validate/domain/url/safety-threat-check | Check a URL for safety threats |
DomainApi | domainSsrfCheck | POST /validate/domain/url/ssrf-threat-check | Check a URL for SSRF threats |
DomainApi | domainSsrfCheckBatch | POST /validate/domain/url/ssrf-threat-check/batch | Check a URL for SSRF threats in batches |
DomainApi | domainUrlFull | POST /validate/domain/url/full | Validate a URL fully |
DomainApi | domainUrlHtmlSsrfCheck | POST /validate/domain/url/ssrf-threat-check/html-embedded | Check a URL for HTML embedded SSRF threats |
DomainApi | domainUrlSyntaxOnly | POST /validate/domain/url/syntax-only | Validate a URL syntactically |
EmailApi | emailAddressGetServers | POST /validate/email/address/servers | Partially check whether an email address is valid |
EmailApi | emailFullValidation | POST /validate/email/address/full | Fully validate an email address |
EmailApi | emailPost | POST /validate/email/address/syntaxOnly | Validate email adddress for syntactic correctness only |
IPAddressApi | iPAddressGeolocateStreetAddress | POST /validate/ip/geolocate/street-address | Geolocate an IP address to a street address |
IPAddressApi | iPAddressIpIntelligence | POST /validate/ip/intelligence | Get intelligence on an IP address |
IPAddressApi | iPAddressIsBot | POST /validate/ip/is-bot | Check if IP address is a Bot client |
IPAddressApi | iPAddressIsThreat | POST /validate/ip/is-threat | Check if IP address is a known threat |
IPAddressApi | iPAddressIsTorNode | POST /validate/ip/is-tor-node | Check if IP address is a Tor node server |
IPAddressApi | iPAddressPost | POST /validate/ip/geolocate | Geolocate an IP address |
IPAddressApi | iPAddressReverseDomainLookup | POST /validate/ip/reverse-domain-lookup | Perform a reverse domain name (DNS) lookup on an IP address |
LeadEnrichmentApi | leadEnrichmentEnrichLead | POST /validate/lead-enrichment/lead/enrich | Enrich an input lead with additional fields of data |
LeadEnrichmentApi | leadEnrichmentGetCompanyInformation | POST /validate/lead-enrichment/lead/email/company-information | Get company information from email address |
NameApi | nameGetGender | POST /validate/name/get-gender | Get the gender of a first name |
NameApi | nameIdentifier | POST /validate/name/identifier | Validate a code identifier |
NameApi | nameValidateFirstName | POST /validate/name/first | Validate a first name |
NameApi | nameValidateFullName | POST /validate/name/full-name | Parse and validate a full name |
NameApi | nameValidateLastName | POST /validate/name/last | Validate a last name |
PhoneNumberApi | phoneNumberSyntaxOnly | POST /validate/phonenumber/basic | Validate phone number (basic) |
TextInputApi | textInputCheckHtmlSsrf | POST /validate/text-input/html/check/ssrf | Protect html input from Server-side Request Forgery (SSRF) attacks |
TextInputApi | textInputCheckSqlInjection | POST /validate/text-input/check/sql-injection | Check text input for SQL Injection (SQLI) attacks |
TextInputApi | textInputCheckSqlInjectionBatch | POST /validate/text-input/check/sql-injection/batch | Check and protect multiple text inputs for SQL Injection (SQLI) attacks in batch |
TextInputApi | textInputCheckXss | POST /validate/text-input/check/xss | Check text input for Cross-Site-Scripting (XSS) attacks |
TextInputApi | textInputCheckXssBatch | POST /validate/text-input/check-and-protect/xss/batch | Check and protect multiple text inputs for Cross-Site-Scripting (XSS) attacks in batch |
TextInputApi | textInputCheckXxe | POST /validate/text-input/check/xxe | Protect text input from XML External Entity (XXE) attacks |
TextInputApi | textInputCheckXxeBatch | POST /validate/text-input/check/xxe/batch | Protect text input from XML External Entity (XXE) attacks |
TextInputApi | textInputProtectXss | POST /validate/text-input/protect/xss | Protect text input from Cross-Site-Scripting (XSS) attacks through normalization |
UserAgentApi | userAgentParse | POST /validate/useragent/parse | Parse an HTTP User-Agent string, identify robots |
VatApi | vatVatLookup | POST /validate/vat/lookup | Validate a VAT number |
- AddressGetServersResponse
- AddressVerifySyntaxOnlyResponse
- BotCheckResponse
- CheckResponse
- CountryDetails
- CountryListResult
- DateTimeNaturalLanguageParseRequest
- DateTimeNowResult
- DateTimeStandardizedParseRequest
- DateTimeStandardizedParseResponse
- DomainQualityResponse
- EmailLead
- FirstNameValidationRequest
- FirstNameValidationResponse
- FullEmailValidationResponse
- FullNameValidationRequest
- FullNameValidationResponse
- GeolocateResponse
- GeolocateStreetAddressResponse
- GetGenderRequest
- GetGenderResponse
- GetPublicHolidaysRequest
- GetTimezonesRequest
- GetTimezonesResponse
- HtmlSsrfDetectionResult
- IPIntelligenceResponse
- IPReverseDNSLookupResponse
- IPThreatResponse
- IsAdminPathResponse
- LastNameValidationRequest
- LastNameValidationResponse
- LeadEnrichmentRequest
- LeadEnrichmentResponse
- NormalizeAddressResponse
- ParseAddressRequest
- ParseAddressResponse
- PhishingCheckRequest
- PhishingCheckResponse
- PhoneNumberValidateRequest
- PhoneNumberValidationResponse
- PublicHolidayOccurrence
- PublicHolidaysResponse
- ReverseGeocodeAddressRequest
- ReverseGeocodeAddressResponse
- SqlInjectionCheckBatchRequest
- SqlInjectionCheckBatchResponse
- SqlInjectionCheckRequestItem
- SqlInjectionDetectionResult
- Timezone
- TorNodeResponse
- UrlHtmlSsrfRequestFull
- UrlHtmlSsrfResponseFull
- UrlSafetyCheckRequestFull
- UrlSafetyCheckResponseFull
- UrlSsrfRequestBatch
- UrlSsrfRequestFull
- UrlSsrfResponseBatch
- UrlSsrfResponseFull
- UserAgentValidateRequest
- UserAgentValidateResponse
- ValidateAddressRequest
- ValidateAddressResponse
- ValidateCityRequest
- ValidateCityResponse
- ValidateCountryRequest
- ValidateCountryResponse
- ValidateIdentifierRequest
- ValidateIdentifierResponse
- ValidatePostalCodeRequest
- ValidatePostalCodeResponse
- ValidateStateRequest
- ValidateStateResponse
- ValidateUrlRequestFull
- ValidateUrlRequestSyntaxOnly
- ValidateUrlResponseFull
- ValidateUrlResponseSyntaxOnly
- VatLookupRequest
- VatLookupResponse
- WhoisResponse
- XssProtectionBatchRequest
- XssProtectionBatchResponse
- XssProtectionRequestItem
- XssProtectionResult
- XxeDetectionBatchRequest
- XxeDetectionBatchResponse
- XxeDetectionRequestItem
- XxeDetectionResult
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header