# 🚀 Welcome to Abstract API
Source: https://docs.abstractapi.com/api
Explore all APIs, guides, and resources to integrate Abstract into your applications.
## đź› Popular APIs
Validate email format, MX records, SMTP responses, mailbox status, and detect disposable or risky domains and evaluate sender quality.
Identify carrier, line type, validity, location, and get deep insights including line status, VoIP detection, risk scoring, SMS domain, and more.
Map an IP address to country, region, city, coordinates, timezone, and detect proxies, VPNs, Tor nodes, cloud hosts, malicious IPs, and other risk indicators.
Enrich any domain or email with accurate company data, including, name, logo, headcount, location and industry.
***
# Avatars API
Source: https://docs.abstractapi.com/api/avatars
GET https://avatars.abstractapi.com/v1
Abstract's Avatars API is a fast, lightweight, modern, and RESTful JSON API for creating highly customizable avatar images with a person's name or initials to improve your user experience.
It's very simple to use: you only need to submit your `api_key` and a `name`, and the API will generate an avatar image matching the initials of the given name.
## Getting started
### REST
The Avatars API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The Avatars API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The Avatars API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's Avatars API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the Avatars and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://avatars.abstractapi.com/v1/
```
### Validation endpoint
Abstract's Avatars API simply requires your unique API key and the name of the user you'd like to generate an avatar to:
```
https://avatars.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& name = Claire Florentz
```
This was a successful request, so the avatar for the provided name is returned below:
### Request parameters
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Avatars API key will not work for your IP Geolocation API, for example.
The name you want to create an avatar for. You can submit multiple names (such as first, middle, and last), and the API will default to displaying two letters in the avatar. You can change the number of letters displayed with the char\_limit parameter below.
The size of the square avatar image in pixels. It defaults to 128 pixels, and is available in sizes from 6 to 512 pixels.
The desired format of the returned image. It defaults to "png", but can also be specified as "svg".
The size of the font as a percent of the image\_size. It defaults to 0.7, but it can be set between 0.1 and 1.0.
The maximum number of characters displayed in the avatar. It defaults to 2. The actual number of characters displayed can be less than this number, but it cannot be more. The characters will first be chosen from distinct words, then from the second letter of distinct words.
The hex color for the background. It defaults to #335eea. When including a hex color, you do not need to include the "#". So \&background\_color=e4704a would be valid and \&background\_color=#e4704a would be invalid.
The hex color for the font. It defaults to white, i.e.,ffffff. When including a hex color, you do not need to include the "#". So \&font\_color=e4704a would be valid and \&font\_color=#e4704a would be invalid.
Returns a rounded avatar picture instead of squared one. It defaults to false.
Sets the initials in the avatar to all capitals. It defaults to true.
Sets the initials in the avatar to all italics. It defaults to false.
Sets the initials in the avatar to bold. It defaults to false.
# Company Enrichment API
Source: https://docs.abstractapi.com/api/company-enrichment
GET https://companyenrichment.abstractapi.com/v2
With Abstract's Company Enrichment API, you can easily get detailed information about any company domain.
It's very simple to use: you are only required to send your unique `api_key` and the `domain` you want to enrich to get information about the company.
## Getting started
### REST
The Company Enrichment API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The Company Enrichment API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The Company Enrichment API is currently on Version 2.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's Company Enrichment API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the Company Enrichment and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://companyenrichment.abstractapi.com/v2
```
### Validation endpoint
Abstract's Company Enrichment API simply requires your unique API key and the domain you’d like to enrich:
```
https://companyenrichment.abstractapi.com/v2
? api_key = YOUR_UNIQUE_API_KEY
& domain = airbnb.com
```
This was a successful request, so the company details associated with the domain are returned below:
```json theme={null}
{
"domain": "airbnb.com",
"company_name": "Airbnb",
"description": "Airbnb is a company that provides a wide array of accommodations for every type of traveler. With over 7 million vacation rentals and 2 million top-rated guest favorites across more than 220 countries and regions, Airbnb offers a unique and diverse selection of stays worldwide.",
"logo": "https://logo.abstractapi.com/cb6281618-c67a-5004-9c9b-29fc2245a4f7_-airbnb.png",
"year_founded": "2008",
"street_address": "888 Brannan Street",
"city": "San Francisco",
"state": "California",
"country": "United States",
"country_iso_code" : "US",
"postal_code" : "94103",
"latitude": 37.7719568,
"longitude": -122.4054484 ,
"sic_code": "87",
"naics_code": "54",
"industry": "Travel Services",
"employee_count": 6907,
"employee_range": "5K-10K",
"annual_revenue": "9917000000",
"revenue_range": "$1B-$10B",
"phone_numbers": ["+14155104027"],
"email_addresses" : ["support@airbnb.com"],
"type" : "public",
"ticker" : "ABNB",
"exchange" : "XNAS",
"global_ranking" : "7391",
"tags": ["Hospitality","Travel"],
"technologies" : ["Google Analytics","Javascript","Segment","Mixpanel","Branch","Salesforce","New Relic","Facebook Pixel"],
"linkedin_url" : "linkedin.com/company/airbnb",
"facebook_url" : "facebook.com/airbnb",
"twitter_url" : "twitter.com/airbnb",
"instagram_url" : "instagram.com/airbnb",
"crunchbase_url" : "crunchbase.com/organization/airbnb"
}
```
### Request parameters
Your unique API key. Note that each user has unique API keys *for each of
Abstract's APIs*, so your Company Enrichment API key will not work for your IP
Geolocation API, for example.
The domain of the company you want to get data from.
You can chose to only receive a few fields from the JSON response. To do so, you can include a fields value in the query parameters with a comma separated list of the top-level keys you want to be returned. For example, adding ?fields=domain will return only the domain in the JSON response.
### Response parameters
The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).
The domain the company website is hosted on.
The name of the company.
A brief description of the company.
The URL to download the company's logo.
The year the company was founded.
The number and name of the street the company is based in.
The city or regiont he company headquarter is based in.
The state the company is based in.
The country the company is based in.
Country's ISO 3166-1 alpha-2 code.
ZIP or postal code.
Decimal of the latitude.
Decimal of the longitude.
Code that indicates the industry of the company
Code that indicates the industry of the company
The industry the company is operating in.
The approximate number of employees of the company.
The approximate range of employees of the company.
The approximate annual reveneu of the company.
The approximate range of revenue of the company.
Array with the phone numbers of the company.
Array with the emails addresess to contact the company.
Indicates if the company is public or private.
If the company is public, it will show the company's ticker.
If the company is public, it will show the company's exchange.
Indicates if the company is listes on the Umbrella top 1 Million companies.
Array with the company's tags.
Array with the company's tech tags.
Linkedin URL
Facebook URL
Twitter/X URL
Instagram URL
Crunchbase URL
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned in JSON format. The errors include an error code and description, which you can find detailed below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
## Code samples and libraries
Please see the top of this page for code samples for these languages and more. If we're missing a code sample, or if you'd like to contribute a code sample or library in exchange for free credits, email us at: [team@abstractapi.com](mailto:team@abstractapi.com)
## Other notes
A note on metered billing: Each individual domain you submit for lookup counts as a credit used. Credits are counted per request, not per successful response. So if you submit a request for the (invalid) domain "kasj8929hs", that still counts as 1 credit.
# Email Reputation API
Source: https://docs.abstractapi.com/api/email-reputation
GET https://emailreputation.abstractapi.com/v1
Improve your delivery rates, clean your email lists, and block fraudulent users with Abstract’s industry-leading Email Reputation API.
## Getting Started
Abstract's Email Reputation API requires only your unique API key `api_key` and a single email `email`:
```bash theme={null}
https://emailreputation.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& email = johnsmith@gmail.com
```
This was a successful request, and all available details about that email were returned:
```json theme={null}
{
"email_address": "benjamin.richard@abstractapi.com",
"email_deliverability": {
"status": "deliverable",
"status_detail": "valid_email",
"is_format_valid": true,
"is_smtp_valid": true,
"is_mx_valid": true,
"mx_records": [
"gmail-smtp-in.l.google.com",
"alt3.gmail-smtp-in.l.google.com",
"alt4.gmail-smtp-in.l.google.com",
"alt1.gmail-smtp-in.l.google.com",
"alt2.gmail-smtp-in.l.google.com"
]
},
"email_quality": {
"score": 0.8,
"is_free_email": false,
"is_username_suspicious": false,
"is_disposable": false,
"is_catchall": true,
"is_subaddress": false,
"is_role": false,
"is_dmarc_enforced": true,
"is_spf_strict": true,
"minimum_age": 1418
},
"email_sender": {
"first_name": "Benjamin",
"last_name": "Richard",
"email_provider_name": "Google",
"organization_name": "Abstract API",
"organization_type": "company"
},
"email_domain": {
"domain": "abstractapi.com",
"domain_age": 1418,
"is_live_site": true,
"registrar": "NAMECHEAP INC",
"registrar_url": "http://www.namecheap.com",
"date_registered": "2020-05-13",
"date_last_renewed": "2024-04-13",
"date_expires": "2025-05-13",
"is_risky_tld": false
},
"email_risk": {
"address_risk_status": "low",
"domain_risk_status": "low"
},
"email_breaches": {
"total_breaches": 2,
"date_first_breached": "2018-07-23T14:30:00Z",
"date_last_breached": "2019-05-24T14:30:00Z",
"breached_domains": [
{ "domain": "apollo.io", "date_breached": "2018-07-23T14:30:00Z" },
{ "domain": "canva.com", "date_breached": "2019-05-24T14:30:00Z" }
]
}
}
```
### Request parameters
Your unique API key. Note that each user has unique API keys *for each of
Abstract's APIs*, so your Email Validation API key will not work for your IP
Geolocation API, for example.
The email address to validate.
### Response parameters
The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).
The email address you submitted for analysis.
Whether the email is considered `deliverable`, `undeliverable`, or `unknown`.
Additional detail on deliverability (e.g., `inbox_full`, `full_mailbox`, `invalid_format`).
Is `true` if the email follows the correct format.
Is `true` if the SMTP check was successful.
Is `true` if the domain has valid MX records.
List of MX records associated with the domain.
Confidence score between 0.01 and 0.99 representing email quality.
Is `true` if the email is from a known free provider like Gmail or Yahoo.
Is `true` if the username appears auto-generated or suspicious.
Is `true` if the email is from a disposable email provider.
Is `true` if the domain is configured to accept all emails.
Is `true` if the email uses subaddressing (e.g., `user+label@domain.com`).
Is `true` if the email is a role-based address (e.g., `info@domain.com`, `support@domain.com`).
Is `true` if a strict DMARC policy is enforced on the domain.
Is `true` if the domain enforces a strict SPF policy.
Estimated age of the email address in days, or `null` if unknown.
First name associated with the email address, if available.
Last name associated with the email address, if available.
Name of the email provider (e.g., Google, Microsoft).
Organization linked to the email or domain, if available.
Type of organization (e.g., `company`).
Domain part of the submitted email address.
Age of the domain in days.
Is `true` if the domain has a live website.
Name of the domain registrar.
URL of the domain registrar.
Date when the domain was registered.
Last renewal date of the domain.
Expiration date of the domain registration.
Is `true` if the domain uses a top-level domain associated with risk.
Risk status of the email address: `low`, `medium`, or `high`.
Risk status of the domain: `low`, `medium`, or `high`.
Total number of data breaches involving this email.
Date of the first known breach.
Date of the most recent breach.
List of breached domains including:
Domain affected by the breach.
Date when the breach occurred.
## Request examples
### Checking a malformed email
In the example below, we show the request and response for an email does not follow the proper format. If the email fails the `is_format_valid` check, then the other checks will not be performed and will be returned as false
```bash theme={null}
https://emailreputation.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& email = johnsmith
```
The request was valid and successful, and so it returns the following:
```json theme={null}
{
"email_address": "johnsmith",
"email_deliverability": {
"status": "undeliverable",
"status_detail": "invalid_format",
"is_format_valid": false,
"is_smtp_valid": false,
"is_mx_valid": false,
"mx_records": []
},
"email_quality": {
"score": null,
"is_free_email": null,
"is_username_suspicious": null,
"is_disposable": null,
"is_catchall": null,
"is_subaddress": null,
"is_role": null,
"is_dmarc_enforced": null,
"is_spf_strict": null,
"minimum_age": null
},
"email_sender": {
"first_name": null,
"last_name": null,
"email_provider_name": null,
"organization_name": null,
"organization_type": null
},
"email_domain": {
"domain": null,
"domain_age": null,
"is_live_site": null,
"registrar": null,
"registrar_url": null,
"date_registered": null,
"date_last_renewed": null,
"date_expires": null,
"is_risky_tld": null
},
"email_risk": {
"address_risk_status": null,
"domain_risk_status": null
},
"email_breaches": {
"total_breaches": null,
"date_first_breached": null,
"date_last_breached": null,
"breached_domains": []
}
}
```
## Possible values for status\_detail
This field provides more information about the deliverability result.
#### When `status` is `deliverable`:
* **valid\_email**: The email address exists, is valid, and can receive new emails.
* **high\_traffic\_email**: The email is valid and exists, but the server is receiving too many messages. Your email might bounce.
#### When `status` is `undeliverable`:
* **invalid\_mailbox**: The email address doesn't exist or is no longer active. It can't receive new emails.
* **full\_mailbox**: The email exists but its mailbox is full, so new emails will bounce.
* **invalid\_format**: The email doesn't follow the correct format (e.g., missing `@` or domain).
* **dns\_record\_not\_found**: We couldn't find MX records for the domain, so we couldn’t complete the SMTP check.
* **unavailable\_server**: The mail server for the domain is currently unreachable.
## Bulk upload (CSV)
Don't know how to or don't want to make API calls? Use the bulk CSV uploader to easily use the API. The results will be sent to your email when ready.
Here are some best practices when bulk uploading a CSV file:
* Ensure the selected column contains the email addresses to be analyzed.
* Remove any empty rows from the file.
* Include only one email address per row.
* The maximum file size permitted is 50,000 rows.
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
## Code samples and libraries
Please see the top of this page for code samples for these languages and more. If we're missing a code sample, or if you'd like to contribute a code sample or library in exchange for free credits, email us at: [team@abstractapi.com](mailto:team@abstractapi.com)
## Other notes
A note on metered billing: Each individual email you submit counts as a credit used. Credits are also counted per request, not per successful response. So if you submit a request for the (invalid) email address "kasj8929hs", that still counts as 1 credit.
# Exchange Rates API
Source: https://docs.abstractapi.com/api/exchange-rates
Abstract's Exchange Rates API is a fast, lightweight, modern, and RESTful JSON API for looking up the latest exchange rates for 80+ currencies, getting historical exchange rates, and converting an arbitrary amount from one currency to another.
## Getting started
The `live` endpoint returns the most recent exchange rates for a given set of currencies. The base currency is the currency you're converting from, while the target currency or currencies are what you're converting to.
The `convert` endpoint is similar to the `live` endpoint but allows you to convert an arbitrary amount from one currency to another.
The `historical` endpoint functions almost exactly like the `live` endpoint, except it requires a date parameter and returns the exchange rates for that specific date for a given set of currencies.
### REST
The Exchange Rates API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The Exchange Rates API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The Exchange Rates API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's Exchange Rates API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the Exchange Rates and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Code samples and libraries
Please see the top of this page for code samples for these languages and more. If we're missing a code sample, or if you'd like to contribute a code sample or library in exchange for free credits, email us at: [team@abstractapi.com](mailto:team@abstractapi.com)
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 204 | OK | Their is no location data for the submitted IP. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
## Currency codes of supported currencies
Below are the ISO 4217 codes of supported currencies. If you'd like us to support a currency that's not listed below, please contact [hello@abstractapi.com](mailto:hello@abstractapi.com)
| Currency code | Currency name |
| ------------- | ---------------------- |
| ARS | Argentine Peso |
| AUD | Australian Dollar |
| BCH | Bitcoin Cash |
| BGN | Bulgarian Lev |
| BNB | Binance Coin |
| BRL | Brazilian Real |
| BTC | Bitcoin |
| CAD | Canadian Dollar |
| CHF | Swiss Franc |
| CNY | Chinese Yuan |
| CYP | Cypriot Pound |
| CZK | Czech Republic Koruna |
| DKK | Danish Krone |
| DOGE | Dogecoin |
| DZD | Algerian Dinar |
| EEK | Estonian Kroon |
| ETH | Ethereum |
| EUR | Euro |
| GBP | British Pound Sterling |
| GRD | Greek Drachma |
| HKD | Hong Kong Dollar |
| HRK | Croatian Kuna |
| HUF | Hungarian Forint |
| IDR | Indonesian Rupiah |
| ILS | Israeli New Sheqel |
| INR | Indian Rupee |
| ISK | Icelandic KrĂłna |
| JPY | Japanese Yen |
| KRW | South Korean Won |
| LTC | Litecoin |
| LTL | Lithuanian Litas |
| LVL | Latvian Lats |
| MAD | Moroccan Dirham |
| MTL | Maltese Lira |
| MXN | Mexican Peso |
| MYR | Malaysian Ringgit |
| NOK | Norwegian Krone |
| NZD | New Zealand Dollar |
| PHP | Philippine Peso |
| PLN | Polish Zloty |
| RON | Romanian Leu |
| RUB | Russian Ruble |
| SEK | Swedish Krona |
| SGD | Singapore Dollar |
| SIT | Slovenian Tolar |
| SKK | Slovak Koruna |
| THB | Thai Baht |
| TRY | Turkish Lira |
| TWD | New Taiwan Dollar |
| USD | United States Dollar |
| XRP | Ripple |
| ZAR | South African Rand |
# Public Holidays API
Source: https://docs.abstractapi.com/api/holidays
GET https://holidays.abstractapi.com/v1/
Abstract's Public Holidays API is a fast, lightweight, modern, and RESTful JSON API that allows you to get the public, local, religious, and other holidays of a particular country.
It's simple to use: you only need to submit your `api_key` and a two letter country code `country`. The API will return the public holidays for that country.
## Getting started
### REST
The Public Holidays API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The Public Holidays API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The Public Holidays API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's Public Holidays API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the Public Holidays and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://holidays.abstractapi.com/v1/
```
### Validation endpoint
Abstract's Public Holidays API simply requires your unique API key and the country you'd like to get the public holidays from.
```
https://holidays.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& country = SG
```
This was a successful request, so the public holidays from Singapore and details associated with it are returned as the example on the right.
```json theme={null}
[
{
"name": "New Year's Day",
"name_local": "",
"language": "",
"description": "",
"country": "SG",
"location": "Singapore",
"type": "National",
"date": "01/01/2023",
"date_year": "2023",
"date_month": "01",
"date_day": "01",
"week_day": "Sunday"
},
{
"name": "New Year's Day",
"name_local": "",
"language": "",
"description": "",
"country": "SG",
"location": "Singapore",
"type": "National",
"date": "01/02/2023",
"date_year": "2023",
"date_month": "01",
"date_day": "02",
"week_day": "Monday"
},
{
"name": "Chinese Lunar New Year's Day",
"name_local": "",
"language": "",
"description": "",
"country": "SG",
"location": "Singapore",
"type": "National",
"date": "01/23/2023",
"date_year": "2023",
"date_month": "01",
"date_day": "23",
"week_day": "Monday"
},
......
{
"name": "Christmas Eve",
"name_local": "",
"language": "",
"description": "",
"country": "SG",
"location": "Singapore",
"type": "Observance",
"date": "12/24/2023",
"date_year": "2023",
"date_month": "12",
"date_day": "24",
"week_day": "Sunday"
},
{
"name": "Christmas Day",
"name_local": "",
"language": "",
"description": "",
"country": "SG",
"location": "Singapore",
"type": "National",
"date": "12/25/2023",
"date_year": "2023",
"date_month": "12",
"date_day": "25",
"week_day": "Monday"
},
{
"name": "New Year's Eve",
"name_local": "",
"language": "",
"description": "",
"country": "SG",
"location": "Singapore",
"type": "Observance",
"date": "12/31/2023",
"date_year": "2023",
"date_month": "12",
"date_day": "31",
"week_day": "Sunday"
}
]
```
### Checking specific days, months, or years
It's also possible to specify the day, month, or year. Note that if you specify a day, you must also include a month and year. If you specify a month, you must also specify the year.
For example, this will return all the holidays in the US in January 2021:
```
https://holidays.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& country = US
& year = 2021
& month = 01
```
And this would return any holidays in the US on January 1, 2021:
```
https://holidays.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& country = US
& year = 2021
& month = 01
& day = 01
```
> Note: if the query is valid but there are no holidays in the checked period, you will get a 200 response with an empty array.
### Request parameters
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Public Holiday API key will not work for your IP Geolocation API, for example.
The country's two letter ISO 3166-1 alpha-2 code.
The year to get the holiday(s) from. Note that this is optional on paid plans and required on free plans, and if left blank it will default to the current year.
The month to get the holiday(s) from, in the format of 1-12 (e.g., 1 is January, 2 is February, etc). Note that this is optional on paid plans and required on free plans, and if left blank it will default to the current month.
The day to get the holiday(s) from, in the format of 1-31. Note that this is optional on paid plans and required on free plans, and if left blank it will default to the current day.
### Response parameters
The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).
The name of the holiday.
The local name of the holiday.
If the name\_local is used, then this specifies the language in which it is in.
A short description or additional details on the holiday, such as whether it is part of a long weekend.
The country in which the holiday occurs, returned directly from the request.
The location or region in which the holiday occurs, if the holiday is that specific.
The type of holiday it is (e.g., public holiday, religious holiday, etc).
The date on which the holiday occurs.
The year in which the holiday occurs.
The month in which the holiday occurs.
The day in which the holiday occurs.
The day of the week on which the holiday occurs (Monday, Tuesday, Wednesday, etc.)
## Code samples and libraries
Please see the top of this page for code samples for these languages and more. If we're missing a code sample, or if you'd like to contribute a code sample or library in exchange for free credits, email us at: [team@abstractapi.com](mailto:team@abstractapi.com)
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
## Country Codes
Below is a list of two-letter ISO 3166 Alpha 2 country codes to use when querying for a specific country.
| Country name | Country code |
| -------------------------------- | ------------ |
| Afghanistan | AF |
| Albania | AL |
| Algeria | DZ |
| American Samoa | AS |
| Andorra | AD |
| Angola | AO |
| Anguilla | AI |
| Antigua and Barbuda | AG |
| Argentina | AR |
| Armenia | AM |
| Aruba | AW |
| Australia | AU |
| Austria | AT |
| Azerbaijan | AZ |
| Bahrain | BH |
| Bangladesh | BD |
| Barbados | BB |
| Belarus | BY |
| Belgium | BE |
| Belize | BZ |
| Benin | BJ |
| Bermuda | BM |
| Bhutan | BT |
| Bolivia | BO |
| Bosnia and Herzegovina | BA |
| Botswana | BW |
| Brazil | BR |
| British Virgin Islands | VG |
| Brunei | BN |
| Bulgaria | BG |
| Burkina Faso | BF |
| Burundi | BI |
| Cabo Verde | CV |
| Cambodia | KH |
| Cameroon | CM |
| Canada | CA |
| Cayman Islands | KY |
| Central African Republic | CF |
| Chad | TD |
| Chile | CL |
| China | CN |
| Colombia | CO |
| Comoros | KM |
| Congo | CG |
| Congo Democratic Republic | CD |
| Cook Islands | CK |
| Costa Rica | CR |
| Cote d'Ivoire | CI |
| Croatia | HR |
| Cuba | CU |
| Curaçao | CW |
| Cyprus | CY |
| Czechia | CZ |
| Denmark | DK |
| Djibouti | DJ |
| Dominica | DM |
| Dominican Republic | DO |
| East Timor | TL |
| Ecuador | EC |
| Egypt | EG |
| El Salvador | SV |
| Equatorial Guinea | GQ |
| Eritrea | ER |
| Estonia | EE |
| eSwatini | SZ |
| Ethiopia | ET |
| Falkland Islands | FK |
| Faroe Islands | FO |
| Fiji | FJ |
| Finland | FI |
| France | FR |
| French Guiana | GF |
| French Polynesia | PF |
| Gabon | GA |
| Gambia | GM |
| Georgia | GE |
| Germany | DE |
| Ghana | GH |
| Gibraltar | GI |
| Greece | GR |
| Greenland | GL |
| Grenada | GD |
| Guadeloupe | GP |
| Guam | GU |
| Guatemala | GT |
| Guernsey | GG |
| Guinea | GN |
| Guinea Bissau | GW |
| Guyana | GY |
| Haiti | HT |
| Honduras | HN |
| Hong Kong | HK |
| Hungary | HU |
| Iceland | IS |
| India | IN |
| Indonesia | ID |
| Iran | IR |
| Iraq | IQ |
| Ireland | IE |
| Isle of Man | IM |
| Israel | IL |
| Italy | IT |
| Jamaica | JM |
| Japan | JP |
| Jersey | JE |
| Jordan | JO |
| Kazakhstan | KZ |
| Kenya | KE |
| Kiribati | KI |
| Kosovo | XK |
| Kuwait | KW |
| Kyrgyzstan | KG |
| Laos | LA |
| Latvia | LV |
| Lebanon | LB |
| Lesotho | LS |
| Liberia | LR |
| Libya | LY |
| Liechtenstein | LI |
| Lithuania | LT |
| Luxembourg | LU |
| Macau | MO |
| Madagascar | MG |
| Malawi | MW |
| Malaysia | MY |
| Maldives | MV |
| Mali | ML |
| Malta | MT |
| Marshall Islands | MH |
| Martinique | MQ |
| Mauritania | MR |
| Mauritius | MU |
| Mayotte | YT |
| Mexico | MX |
| Micronesia | FM |
| Moldova | MD |
| Monaco | MC |
| Mongolia | MN |
| Montenegro | ME |
| Montserrat | MS |
| Morocco | MA |
| Mozambique | MZ |
| Myanmar | MM |
| Namibia | NA |
| Nauru | NR |
| Nepal | NP |
| Netherlands | NL |
| New Caledonia | NC |
| New Zealand | NZ |
| Nicaragua | NI |
| Niger | NE |
| Nigeria | NG |
| North Korea | KP |
| North Macedonia | MK |
| Northern Mariana Islands | MP |
| Norway | NO |
| Oman | OM |
| Pakistan | PK |
| Palau | PW |
| Panama | PA |
| Papua New Guinea | PG |
| Paraguay | PY |
| Peru | PE |
| Philippines | PH |
| Poland | PL |
| Portugal | PT |
| Puerto Rico | PR |
| Qatar | QA |
| Reunion | RE |
| Romania | RO |
| Russia | RE |
| Rwanda | RW |
| Saint Helena | SH |
| Saint Kitts and Nevis | KN |
| Saint Lucia | LC |
| Saint Martin | MF |
| Saint Pierre and Miquelon | PM |
| Saint Vincent and the Grenadines | VC |
| Samoa | WS |
| San Marino | SM |
| Sao Tome and Principe | ST |
| Saudi Arabia | SA |
| Senegal | SN |
| Serbia | RS |
| Seychelles | SC |
| Sierra Leone | SL |
| Singapore | SG |
| Sint Maarten | SX |
| Slovakia | SK |
| Slovenia | SI |
| Solomon Islands | SB |
| Somalia | SO |
| South Africa | ZA |
| South Korea | KR |
| South Sudan | SS |
| Spain | ES |
| Sri Lanka | LK |
| St. Barts | BL |
| Sudan | SD |
| Suriname | SR |
| Sweden | SE |
| Switzerland | CH |
| Syria | SY |
| Taiwan | TW |
| Tajikistan | TJ |
| Tanzania | TZ |
| Thailand | TH |
| The Bahamas | BH |
| Togo | TG |
| Tonga | TO |
| Trinidad and Tobago | TT |
| Tunisia | TN |
| Turkey | TR |
| Turkmenistan | TM |
| Turks and Caicos Islands | TC |
| Tuvalu | TV |
| Uganda | UG |
| Ukraine | UA |
| United Arab Emirates | AE |
| United Kingdom | GB |
| United States | US |
| Uruguay | UY |
| US Virgin Islands | VI |
| Uzbekistan | UZ |
| Vanuatu | VU |
| Vatican City (Holy See) | VA |
| Venezuela | VE |
| Vietnam | VN |
| Wallis and Futuna | WF |
| Yemen | YE |
| Zambia | ZM |
| Zimbabwe | ZW |
# IBAN Validation API
Source: https://docs.abstractapi.com/api/iban-validation
GET https://ibanvalidation.abstractapi.com/v1/
Abstract's IBAN Validation API is a fast, lightweight, modern, and RESTful JSON API for determining the validity and other details of the International Bank Account Number (IBAN).
It's very simple to use; you only need to submit your `api_key` and an `iban`, and the API will tell you whether the IBAN is valid or not. Future versions of the API will include more detail about the submitted IBAN if it is valid.
## Getting started
### REST
The IBAN Validation API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The IBAN Validation API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The IBAN Validation API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's IBAN Validation API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the IBAN Validation and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://ibanvalidation.abstractapi.com/v1/
```
### Validation endpoint
Abstract's IBAN Validation API simply requires your unique API key and the IBAN number you'd like to check:
```
https://ibanvalidation.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& iban = BE71096123456769
```
This was a successful request and the IBAN was valid, so the API will return the following:
```json theme={null}
{
"iban": "BE71096123456769",
"is_valid": true
}
```
```json theme={null}
{
"iban": "BE71096123456769",
"is_valid": true
}
```
### Request parameters
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your IBAN Validation API key will not work for your IP Geolocation API, for example.
The IBAN to validate. Note that the API will accept white spaces, so BE71 0961 2345 6769 is considered as valid as BE71096123456769.
### Response parameters
The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).
The IBAN submitted for validation.
Is true if the IBAN submitted is valid and false if it is not.
# Image Processing API
Source: https://docs.abstractapi.com/api/images
Abstract's Image Processing and Optimization API is a simple yet powerful REST API that is used to convert, compress, or optimization an image that is provided via a URL or via POST to the API itself.
It's very simple to use: you only need to submit your `api_key` and an image via url or POST to the API, and the API will respond as assessment of its validity, as well as additional details like the carrier details, line type, region and city details, and more.
## Getting started
There are two methods to begin working with an image
Upload an image giving the API an URL with a hosted version of your image.
Upload an image submitting it directly to the API.
### REST
The Image Processing API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The Image Processing API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The Image Processing API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's Image Processing API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the Image Processing and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
# IP Intelligence API
Source: https://docs.abstractapi.com/api/ip-intelligence
GET https://ip-intelligence.abstractapi.com/v1
Abstract's IP Intelligence API is a fast, reliable, and RESTful JSON API that provides advanced security and geographical insights about IP addresses worldwide. It identifies VPNs, proxies, TOR usage, abuse potential, hosting services, relays, and mobile IPs.
It is very simple to use: you only need to submit your API key and an IP address, and the API will respond with the location of that IP and security details, including VPN detection, proxy status, TOR usage, abuse potential, hosting services, relay status, and mobile IP identification.
## Getting started
### REST
The IP Intelligence API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The IP Intelligence API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The IP Intelligence API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's IP Intelligence API. Note that each of Abstract's APIs has a unique API key, so you will need different keys to access the IP Intelligence and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://ip-intelligence.abstractapi.com/v1/
```
### Validation endpoint
Abstract's IP Intelligence API simply requires your unique API key and will automatically detect the IP address from the client where it is called. You can also append the "ip\_address" parameter to specify the IP to analyze:
```
https://ip-intelligence.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& ip_address = 166.171.248.255 (optional)
```
```json theme={null}
{
"ip_address": "185.197.192.65",
"security": {
"is_vpn": false,
"is_proxy": true,
"is_tor": false,
"is_hosting": false,
"is_relay": false,
"is_mobile": false,
"is_abuse": false,
},
"asn": {
"asn": 136787,
"name": "PacketHub S.A.",
"domain": "packethub.tech",
"type": "isp",
},
"company": {
"name": "PacketHub S.A.",
"domain": "packethub.tech",
"type": "isp",
},
"domains": {
"domains": []
},
"location": {
"city": "Miami",
"city_geoname_id": 4164138,
"region": "Florida",
"region_iso_code": "FL",
"region_geoname_id": 4155751,
"postal_code": "33197",
"country": "United States",
"country_code": "US",
"country_geoname_id": 6252001,
"is_country_eu": false,
"continent": "North America",
"continent_code": "NA",
"continent_geoname_id": 6255149,
"longitude": -80.1946,
"latitude": 25.7689,
},
"timezone": {
"name": "America/New_York",
"abbreviation": "EST",
"utc_offset": -5,
"local_time": "12:07:51",
"is_dst": false,
},
"flag": {
"flag": "🇺🇸",
"unicode": "U+1F1FA U+1F1F8",
"png": "https://static.abstractapi.com/country-flags/US_flag.png",
"svg": "https://static.abstractapi.com/country-flags/US_flag.svg",
},
"currency": {
"name": "US Dollar",
"iso_code": "USD",
"symbol": "$"
}
}
```
### Request parameters
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your IP Intelligence API key will not work for your Email Validation API, for example.
The IP address to analyze. Both IPv4 and IPv6 addresses are supported. Note that if you leave this parameter blank, the service will geolocate the IP address from which the request was made.
You can chose to only receive a few fields from the JSON response. To do so, you can include a fields value in the query parameters with a comma separated list of the top-level keys you want to be returned. For example, adding ?fields=city will return only the city in the JSON response.
This was a successful request, so the IP address and details associated with it are returned below:
### Response parameters
The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).
The IP address submitted for geolocation.
Whether the IP address is being used from a VPN.
Whether the IP address is being used from a Proxy.
Whether the IP address is part of the TOR network.
Whether the IP address is an internet service hosting IP address.
Whether the IP address is being used as a relay server.
Whether the IP address belongs to a mobile network.
Whether the IP address has been flagged for abusive behavior.
The Autonomous System Number (ASN) associated with the IP address.
The name of the organization or ISP associated with the ASN.
The domain associated with the ASN.
The type of organization, such as ISP or hosting.
The name of the company associated with the IP address.
The company's domain name.
The type of company, such as ISP or hosting.
A list of domains associated with the IP address.
City's name.
City's geoname ID.
State or province in which the the city is located.
State or province's ISO 3166-2 code.
State or province's geoname ID.
ZIP or postal code.
Country's name.
Country's ISO 3166-1 alpha-2 code.
Country's geoname ID.
True if the country is in the EU, false if it is not.
Continent's name.
2 letter continent code: AF, AS, EU, NA, OC, SA, AN.
Continent's geoname ID.
Decimal of the longitude.
Decimal of the latitude.
Timezone's name from the IANA Time Zone Database.
Timezone's abbreviation, also from the IANA Time Zone Database.
The UTC offset for the timezone.
Current time in the local time zone.
True if the location is currently in Daylight Savings Time (DST).
Country's flag as an emoji.
Country's flag in unicode.
Link to a hosted version of the country's flag in PNG format.
Link to a hosted version of the country's flag in SVG format.
The currency's name.
The currency's code in ISO 4217 format.
### Limiting response fields
You can choose to only receive a few fields from the JSON response. To do so, you can include a fields value in the query parameters with a comma separated list of the top-level keys you want to be returned.
For example, a request to only get the country and city of an IP will look like this:
```
https://ip-intelligence.abstractapi.com/v1/
? api_key = YOUR_API_KEY
& ip_address = 166.171.248.255
& fields = country,city
```
The response would look like this:
```json theme={null}
{
"country": "United States",
"city": "Modesto"
}
```
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 204 | OK | Their is no location data for the submitted IP. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
## Country Codes
Below is a list of two-letter ISO 3166 Alpha 2 country codes that are used in the response. View this list in a [CSV](https://docs.google.com/spreadsheets/d/1w4VMneDoL6JW2NaUp2SjTOyvRcD4rlXDI0XpqKS2PeQ/view?usp=sharing).
| Country name | Country code |
| -------------------------------- | ------------ |
| Afghanistan | AF |
| Albania | AL |
| Algeria | DZ |
| American Samoa | AS |
| Andorra | AD |
| Angola | AO |
| Anguilla | AI |
| Antigua and Barbuda | AG |
| Argentina | AR |
| Armenia | AM |
| Aruba | AW |
| Australia | AU |
| Austria | AT |
| Azerbaijan | AZ |
| Bahrain | BH |
| Bangladesh | BD |
| Barbados | BB |
| Belarus | BY |
| Belgium | BE |
| Belize | BZ |
| Benin | BJ |
| Bermuda | BM |
| Bhutan | BT |
| Bolivia | BO |
| Bosnia and Herzegovina | BA |
| Botswana | BW |
| Brazil | BR |
| British Virgin Islands | VG |
| Brunei | BN |
| Bulgaria | BG |
| Burkina Faso | BF |
| Burundi | BI |
| Cabo Verde | CV |
| Cambodia | KH |
| Cameroon | CM |
| Canada | CA |
| Cayman Islands | KY |
| Central African Republic | CF |
| Chad | TD |
| Chile | CL |
| China | CN |
| Colombia | CO |
| Comoros | KM |
| Congo | CG |
| Congo Democratic Republic | CD |
| Cook Islands | CK |
| Costa Rica | CR |
| Cote d'Ivoire | CI |
| Croatia | HR |
| Cuba | CU |
| Curaçao | CW |
| Cyprus | CY |
| Czechia | CZ |
| Denmark | DK |
| Djibouti | DJ |
| Dominica | DM |
| Dominican Republic | DO |
| East Timor | TL |
| Ecuador | EC |
| Egypt | EG |
| El Salvador | SV |
| Equatorial Guinea | GQ |
| Eritrea | ER |
| Estonia | EE |
| eSwatini | SZ |
| Ethiopia | ET |
| Falkland Islands | FK |
| Faroe Islands | FO |
| Fiji | FJ |
| Finland | FI |
| France | FR |
| French Guiana | GF |
| French Polynesia | PF |
| Gabon | GA |
| Gambia | GM |
| Georgia | GE |
| Germany | DE |
| Ghana | GH |
| Gibraltar | GI |
| Greece | GR |
| Greenland | GL |
| Grenada | GD |
| Guadeloupe | GP |
| Guam | GU |
| Guatemala | GT |
| Guernsey | GG |
| Guinea | GN |
| Guinea-Bissau | GW |
| Guyana | GY |
| Haiti | HT |
| Honduras | HN |
| Hong Kong | HK |
| Hungary | HU |
| Iceland | IS |
| India | IN |
| Indonesia | ID |
| Iran | IR |
| Iraq | IQ |
| Ireland | IE |
| Isle of Man | IM |
| Israel | IL |
| Italy | IT |
| Jamaica | JM |
| Japan | JP |
| Jersey | JE |
| Jordan | JO |
| Kazakhstan | KZ |
| Kenya | KE |
| Kiribati | KI |
| Kosovo | XK |
| Kuwait | KW |
| Kyrgyzstan | KG |
| Laos | LA |
| Latvia | LV |
| Lebanon | LB |
| Lesotho | LS |
| Liberia | LR |
| Libya | LY |
| Liechtenstein | LI |
| Lithuania | LT |
| Luxembourg | LU |
| Macau | MO |
| Madagascar | MG |
| Malawi | MW |
| Malaysia | MY |
| Maldives | MV |
| Mali | ML |
| Malta | MT |
| Marshall Islands | MH |
| Martinique | MQ |
| Mauritania | MR |
| Mauritius | MU |
| Mayotte | YT |
| Mexico | MX |
| Micronesia | FM |
| Moldova | MD |
| Monaco | MC |
| Mongolia | MN |
| Montenegro | ME |
| Montserrat | MS |
| Morocco | MA |
| Mozambique | MZ |
| Myanmar | MM |
| Namibia | NA |
| Nauru | NR |
| Nepal | NP |
| Netherlands | NL |
| New Caledonia | NC |
| New Zealand | NZ |
| Nicaragua | NI |
| Niger | NE |
| Nigeria | NG |
| North Korea | KP |
| North Macedonia | MK |
| Northern Mariana Islands | MP |
| Norway | NO |
| Oman | OM |
| Pakistan | PK |
| Palau | PW |
| Panama | PA |
| Papua New Guinea | PG |
| Paraguay | PY |
| Peru | PE |
| Philippines | PH |
| Poland | PL |
| Portugal | PT |
| Puerto Rico | PR |
| Qatar | QA |
| Reunion | RE |
| Romania | RO |
| Russia | RE |
| Rwanda | RW |
| Saint Helena | SH |
| Saint Kitts and Nevis | KN |
| Saint Lucia | LC |
| Saint Martin | MF |
| Saint Pierre and Miquelon | PM |
| Saint Vincent and the Grenadines | VC |
| Samoa | WS |
| San Marino | SM |
| Sao Tome and Principe | ST |
| Saudi Arabia | SA |
| Senegal | SN |
| Serbia | RS |
| Seychelles | SC |
| Sierra Leone | SL |
| Singapore | SG |
| Sint Maarten | SX |
| Slovakia | SK |
| Slovenia | SI |
| Solomon Islands | SB |
| Somalia | SO |
| South Africa | ZA |
| South Korea | KR |
| South Sudan | SS |
| Spain | ES |
| Sri Lanka | LK |
| St. Barts | BL |
| Sudan | SD |
| Suriname | SR |
| Sweden | SE |
| Switzerland | CH |
| Syria | SY |
| Taiwan | TW |
| Tajikistan | TJ |
| Tanzania | TZ |
| Thailand | TH |
| The Bahamas | BH |
| Togo | TG |
| Tonga | TO |
| Trinidad and Tobago | TT |
| Tunisia | TN |
| Turkey | TR |
| Turkmenistan | TM |
| Turks and Caicos Islands | TC |
| Tuvalu | TV |
| Uganda | UG |
| Ukraine | UA |
| United Arab Emirates | AE |
| United Kingdom | GB |
| United States | US |
| Uruguay | UY |
| US Virgin Islands | VI |
| Uzbekistan | UZ |
| Vanuatu | VU |
| Vatican City (Holy See) | VA |
| Venezuela | VE |
| Vietnam | VN |
| Wallis and Futuna | WF |
| Yemen | YE |
| Zambia | ZM |
| Zimbabwe | ZW |
## Code samples and libraries
Please see the top of this page for code samples for these languages and more. If we're missing a code sample, or if you'd like to contribute a code sample or library in exchange for free credits, email us at: [team@abstractapi.com](mailto:team@abstractapi.com)
## Other notes
A note on metered billing: Each individual IP you submit counts as a credit used. Credits are also counted per request, not per successful response. So if you submit a request for the (invalid) IP address "kasj8929hs", that still counts as 1 credit.
# Phone Intelligence API
Source: https://docs.abstractapi.com/api/phone-intelligence
GET https://phoneintelligence.abstractapi.com/v1
Abstract's Phone Intelligence API is a fast, lightweight, modern, and RESTful JSON API for retrieving detailed intelligence about phone numbers, including carrier, location, messaging, registration, risk, and breach data.
It's very simple to use: you only need to submit your API key and a phone number, and the API will respond with enriched intelligence data including carrier details, line type, location, messaging gateways, registration info, risk scoring, and breach history.
## Getting started
### REST
The Phone Intelligence API, like all of Abstract's APIs, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors.
### HTTPS
The Phone Intelligence API requires all communications to be secured TLS 1.2 or greater.
### API Versions
All of Abstract's API are versioned. The Phone Intelligence API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract's Phone Intelligence API. Note that each of Abstract's API has a unique API key, so you will need different keys to access the Phone Intelligence and Email Reputation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://phoneintelligence.abstractapi.com/v1/
```
### Validation endpoint
Abstract's Phone Intelligence API simply requires your unique API key and the phone number you'd like to check:
```
https://phoneintelligence.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& phone = 14154582468
```
This was a successful request, so the valid phone number and details associated with it are returned below:
```json theme={null}
{
"phone_number": "14159929960",
"phone_format": {
"international": "+14159929960",
"national": "(415) 992-9960"
},
"phone_carrier": {
"name": "T-Mobile",
"line_type": "Wireless",
"mcc": "310",
"mnc": "160"
},
"phone_location": {
"country_name": "United States",
"country_code": "US",
"country_prefix": "+1",
"region": "California",
"city": "San Francisco",
"timezone": "America/Los_Angeles"
},
"phone_messaging": {
"sms_domain": "tmomail.net",
"sms_email": "14159929960@tmomail.net"
},
"phone_validation": {
"is_valid": true,
"line_status": "active",
"is_voip": false,
"minimum_age": 1888
},
"phone_registration": {
"name": "Sergio Suarez",
"type": "consumer"
},
"phone_risk": {
"risk_level": "low",
"is_disposable": false,
"is_abuse_detected": false
},
"phone_breaches": {
"total_breaches": 1,
"date_first_breached": "2018-07-23",
"date_last_breached": "2018-07-23",
"breached_domains": [
{
"domain": "facebook.com",
"breach_date": "2019-07-23"
}
]
}
}
```
### Request parameters
Your unique API key. Note that each user has unique API keys *for each of
Abstract's APIs*, so your Phone Validation API key will not work for your IP
Geolocation API, for example.
The phone number to validate and verify.
The country's ISO code. Add this parameter to indicate the phone number's country, and the API will append the corresponding country code to its analysis. For instance, add country=US to indicate that the phone number is from the United States.
### Response parameters
The API response is returned in a universal and lightweight [JSON format](https://www.json.org/json-en.html).
The phone number submitted for analysis.
The object containing the `international` and `national` formats of the submitted number.
The international format of the submitted phone number (e.g. "+1...").
The local/national format of the submitted phone number.
The object containing details about the carrier.
The carrier that the number is registered with.
The type of line. Possible values: `mobile`, `landline`, `voip`, `toll_free`, `personal`, `pager`, `unknown`.
Mobile Country Code (MCC).
Mobile Network Code (MNC).
Geographic details about the phone number.
The name of the country.
The ISO 3166-1 alpha-2 country code.
The calling code prefix.
The region, province, or state associated with the number.
The city associated with the number.
The timezone associated with the number.
Messaging gateway details for the number.
The SMS domain associated with the number's carrier.
The email-to-SMS address associated with the number.
Validation and status information for the number.
Whether the number is valid and dialable.
The line status (e.g. active, inactive).
Whether the number is a VOIP line.
The minimum estimated age of the number, in days.
Registration details for the number.
The registered name associated with the number.
The type of registrant (e.g. consumer, business).
Risk assessment for the number.
The assessed risk level (e.g. low, medium, high).
Whether the number is disposable or temporary.
Whether abuse or spam activity has been detected for this number.
Breach history associated with the number.
The total number of known breaches involving this phone number.
The date of the first known breach.
The date of the most recent known breach.
The list of domains where this number appeared in a breach, including the date of the breach.
## Bulk upload (CSV)
Here are some best practices when bulk uploading a CSV file:
* Ensure the first column contains the phone numbers to be analyzed.
* Remove any empty rows from the file.
* Include only one phone number per row.
* The maximum file size permitted is 50,000 rows.
## Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Code | Type | Details |
| ---- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200 | OK | Everything worked as expected. |
| 400 | Bad request | Bad request. |
| 401 | Unauthorized | The request was unacceptable. Typically due to the API key missing or incorrect. |
| 422 | Quota reached | The request was aborted due to insufficient API credits. (Free plans) |
| 429 | Too many requests | The request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second. |
| 500 | Internal server error | The request could not be completed due to an error on the server side. |
| 503 | Service unavailable | The server was unavailable. |
## Code samples and libraries
Please see the top of this page for code samples for these languages and more. If we're missing a code sample, or if you'd like to contribute a code sample or library in exchange for free credits, email us at: [team@abstractapi.com](mailto:team@abstractapi.com)
## Other notes
A note on metered billing: Each individual phone number you submit counts as a credit used. Credits are also counted per request, not per successful response. So if you submit a request for the (invalid) phone number "kasj8929hs", that still counts as 1 credit.
# Web Scraping API
Source: https://docs.abstractapi.com/api/scrape
GET https://scrape.abstractapi.com/v1
Abstract’s Web Scraping API is a simple yet powerful REST API used to extract data from a given URL. To make a request, you simply include the target URL and your API key, and Abstract’s API will return the data from that site.
It's very simple to use: you only need to submit your `api_key` and a target `URL`, and the API will return the data from that site.
## Getting started
### REST
The Web Scraping API, like all of Abstract’s APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.
### HTTPS
The Web Scraping API requires all communications to be secured with TLS 1.2 or greater.
### API Versions
All of Abstract's APIs are versioned. The Web Scraping API is currently on Version 1.
### Your API Key
Your API key is your unique authentication key to be used to access Abstract’s Web Scraping API. Note that each of Abstract’s APIs has a unique API key, so you will need different keys to access the Web Scraping and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
### Base URL
```
https://scrape.abstractapi.com/v1/
```
### Validation endpoint
Abstract's Web Scraping API simply requires your unique `api_key` and the target `URL` you'd like to scrape:
```
https://scrape.abstractapi.com/v1/
? api_key = YOUR_UNIQUE_API_KEY
& url = https://news.ycombinator.com
```
This was a successful request, so the information from the provided website is returned below:
```
"
Hacker News