SDKs overview
AbstractAPI provides a collection of utility APIs designed for common development tasks, ranging from email verification to IP geolocation. To facilitate integration with these services, AbstractAPI maintains official software development kits (SDKs) and supports community-driven libraries. These SDKs are language-specific wrappers that streamline API interaction by abstracting underlying HTTP requests, handling authentication, and parsing responses into native data structures.
The primary purpose of an SDK is to reduce the boilerplate code developers need to write when consuming an API. Instead of constructing HTTP requests, managing headers, and manually parsing JSON, developers can use SDK methods that correspond directly to API endpoints. This approach is consistent with common practices for interacting with cloud services and external APIs, where SDKs enhance developer experience by providing an idiomatic interface.
AbstractAPI's SDKs are generally tailored to individual APIs within their portfolio. While there isn't a single monolithic SDK for all AbstractAPI services, each core product, such as the Website Screenshot API or Phone Validation API, often has dedicated SDK examples or libraries in popular languages. This modular approach aligns with the microservice nature of their offerings.
Official SDKs by language
AbstractAPI provides official documentation and code examples for integrating with their APIs across several programming languages. While dedicated SDK packages are not uniformly available for every API and language, the documentation consistently offers direct integration guides that serve a similar function to an SDK by providing ready-to-use code snippets. These guides typically cover request construction, API key authentication, and response handling.
The following table summarizes common languages supported through official examples or dedicated libraries within AbstractAPI's documentation. The maturity column indicates the general level of direct support provided, ranging from comprehensive SDKs to detailed code examples.
| Language | Typical Package/Method | Installation Command (Example) | Maturity/Support Level |
|---|---|---|---|
| Python | requests library, direct API calls |
pip install requests |
High (extensive examples, some dedicated wrappers) |
| Node.js | axios or node-fetch, direct API calls |
npm install axios |
High (extensive examples, some dedicated wrappers) |
| PHP | GuzzleHttp/guzzle, direct API calls |
composer require guzzlehttp/guzzle |
Medium (documented examples) |
| Ruby | httparty or rest-client, direct API calls |
gem install httparty |
Medium (documented examples) |
| Java | HttpClient, direct API calls |
(Maven/Gradle dependency for org.apache.httpcomponents:httpclient) |
Medium (documented examples) |
| Go | net/http package, direct API calls |
(No external package needed for basic HTTP) | Medium (documented examples) |
| cURL | Command-line utility | (Typically pre-installed on Unix-like systems) | High (primary example format in docs) |
Installation
Installation of AbstractAPI's SDKs or integration libraries typically follows standard practices for each programming ecosystem. Since many integrations rely on making direct HTTP requests, the primary installation involves common HTTP client libraries. For instance, Python developers often use requests, Node.js developers might use axios, and PHP users frequently employ Guzzle.
Python
To install the requests library for Python, which is commonly used in AbstractAPI's Python examples:
pip install requests
Node.js
For Node.js, axios is a popular choice for making HTTP requests:
npm install axios
PHP
PHP projects often use Composer to manage dependencies, with Guzzle being a prevalent HTTP client:
composer require guzzlehttp/guzzle
Ruby
Ruby applications can use gems like httparty for HTTP interactions:
gem install httparty
Java
Java projects typically manage dependencies with Maven or Gradle. For example, using Apache HttpClient with Maven:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version> <!-- Use the latest version -->
</dependency>
Go
Go's standard library includes the net/http package, which is sufficient for most API interactions, requiring no external installation:
import (
"net/http"
)
For specific AbstractAPI services that might have dedicated SDKs or more complex setup, developers should refer to the official AbstractAPI documentation for precise installation instructions relevant to the chosen API and language.
Quickstart example
This quickstart demonstrates how to use the AbstractAPI Email Verification API in Python. This example involves installing the requests library, making a GET request, and parsing a JSON response. Ensure you replace YOUR_API_KEY with your actual AbstractAPI key, which can be obtained from the AbstractAPI dashboard.
Python Email Verification Quickstart
First, install the requests library if you haven't already:
pip install requests
Then, use the following Python code:
import requests
def verify_email(email_address, api_key):
url = f"https://emailvalidation.abstractapi.com/v1/?api_key={api_key}&email={email_address}"
try:
response = requests.get(url)
response.raise_for_status() # Raise an exception for HTTP errors
data = response.json()
if data.get('deliverability') == 'DELIVERABLE':
print(f"Email '{email_address}' is deliverable.")
else:
print(f"Email '{email_address}' is not deliverable. Reason: {data.get('quality_score')} ({data.get('is_valid_format', {}).get('value')}, {data.get('is_mx_found', {}).get('value')})")
print("Full API Response:")
import json
print(json.dumps(data, indent=2))
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
except ValueError as e:
print(f"Error decoding JSON response: {e}")
# Replace with your actual API key and the email to verify
API_KEY = "YOUR_API_KEY"
EMAIL_TO_VERIFY = "[email protected]"
verify_email(EMAIL_TO_VERIFY, API_KEY)
This script defines a function verify_email that constructs the API request URL, makes the GET request, and then processes the JSON response to check the email's deliverability status. Error handling for network issues and JSON parsing is included.
Community libraries
While AbstractAPI focuses on providing direct API access and comprehensive documentation for various languages, the open-source community often contributes unofficial libraries or wrappers. These community-driven projects can offer alternative interfaces, additional utilities, or examples for integrating specific AbstractAPI services. The availability and maintenance of such libraries can vary significantly.
Developers looking for community contributions should typically search platforms like GitHub, PyPI (for Python), npm (for Node.js), or other language-specific package repositories using keywords such as abstractapi, abstract api, or the specific API name (e.g., abstractapi-email-validation).
When using community-contributed libraries, it is advisable to:
- Check Project Activity: Verify that the library is actively maintained and compatible with the latest AbstractAPI versions.
- Review Documentation: Ensure the library has clear documentation and examples.
- Examine Source Code: For critical applications, review the source code for security practices and adherence to API guidelines, particularly concerning API key handling.
- Consider Support: Community libraries may not offer the same level of support as official SDKs, relying instead on community forums or issue trackers.
As of 2026, AbstractAPI itself does not officially endorse or maintain a public registry of community-contributed libraries. Developers are encouraged to consult the AbstractAPI documentation for official integration methods and examples, which are consistently updated and supported by the AbstractAPI team.