SDKs overview
Software Development Kits (SDKs) and client libraries for the FullContact API provide pre-built code packages that facilitate interaction with its various endpoints. Rather than constructing raw HTTP requests and parsing JSON responses manually, developers can utilize these tools to call API functions using familiar language constructs. This approach aims to reduce development time and potential errors while integrating FullContact's data enrichment capabilities into applications and workflows.
The FullContact API offers RESTful endpoints for accessing person and company data, and for performing identity resolution tasks. The official documentation provides an interactive API reference and code examples across several programming languages to assist with direct API calls as well as SDK usage FullContact API Reference guide. SDKs typically handle authentication, request formatting, and response deserialization, allowing developers to focus on data utilization within their applications.
Official SDKs by language
FullContact provides official SDKs to streamline development in commonly used programming environments. These libraries are maintained by FullContact and are designed to offer stable and up-to-date interfaces to the API's features. Developers can find comprehensive guides and examples for each SDK within the FullContact developer documentation.
The following table outlines the key official SDKs available, their respective package managers, and typical installation commands:
| Language | Package Name | Installation Command | Maturity |
|---|---|---|---|
| Python | fullcontact-api-python |
pip install fullcontact-api-python |
Stable |
| Ruby | fullcontact |
gem install fullcontact |
Stable |
| Node.js | fullcontact |
npm install fullcontact |
Stable |
| PHP | fullcontact/fullcontact-php |
composer require fullcontact/fullcontact-php |
Stable |
| Java | fullcontact-java |
(Maven/Gradle dependency) | Stable |
Installation
Installing a FullContact SDK typically involves using the package manager specific to your chosen programming language. This process fetches the necessary library files and makes them available for import into your project. Below are common installation instructions for popular languages:
Python
To install the Python SDK, use pip, the Python package installer:
pip install fullcontact-api-python
Ruby
For Ruby, use the gem command to install the FullContact gem:
gem install fullcontact
Node.js
Node.js developers can install the SDK via npm, the Node Package Manager:
npm install fullcontact
PHP
For PHP projects, Composer is used to manage dependencies:
composer require fullcontact/fullcontact-php
Java
Java projects typically use Maven or Gradle for dependency management. Add the following to your pom.xml (for Maven) or build.gradle (for Gradle):
Maven (in pom.xml):
<dependency>
<groupId>com.fullcontact</groupId>
<artifactId>fullcontact-java</artifactId>
<version>X.Y.Z</version> <!-- Replace with the latest version -->
</dependency>
Gradle (in build.gradle):
implementation 'com.fullcontact:fullcontact-java:X.Y.Z' <!-- Replace with the latest version -->
Always refer to the official FullContact documentation for the most current version numbers and detailed setup instructions.
Quickstart example
The following Python example demonstrates how to use the FullContact SDK to enrich person data by email address. This snippet illustrates typical steps: importing the library, initializing the client with an API key, making a request, and processing the response.
import os
from fullcontact import FullContactClient
# Your FullContact API Key (recommended to load from environment variable)
# Get your key from: https://www.fullcontact.com/developer/dashboard/
API_KEY = os.environ.get('FULLCONTACT_API_KEY')
if not API_KEY:
print("Error: FULLCONTACT_API_KEY environment variable not set.")
exit()
# Initialize the FullContact client
client = FullContactClient(api_key=API_KEY)
# Define the email address to enrich
email_to_lookup = "[email protected]" # Example email - replace with actual data
try:
# Call the Person Enrichment API
print(f"Looking up person by email: {email_to_lookup}...")
response = client.person.enrich(email=email_to_lookup)
# Check for a successful response
if response.status_code == 200:
data = response.json()
print("Successfully retrieved person data:")
print(f" Full Name: {data.get('fullName', 'N/A')}")
print(f" Job Title: {data.get('demographics', {}).get('primaryOccupation', 'N/A')}")
print(f" Organization: {data.get('organizations', [{}])[0].get('name', 'N/A')}")
print(f" Social Profiles: {len(data.get('profiles', []))}")
elif response.status_code == 204:
print(f"No content found for email: {email_to_lookup}")
else:
print(f"API Error: Status Code {response.status_code}, Message: {response.text}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
Before running this example, ensure you have set your FullContact API key as an environment variable named FULLCONTACT_API_KEY. You can obtain an API key from your FullContact developer dashboard. This example showcases a basic enrichment call; the API supports various other parameters and endpoints for more specific data queries FullContact Person API reference.
For securing API keys, storing them as environment variables is a common practice, as recommended by security guidelines for API usage Google Cloud API key best practices. This prevents keys from being hardcoded directly into source version control.
Community libraries
Beyond the officially supported SDKs, the developer community sometimes contributes unofficial libraries or wrappers that extend functionality or provide support for additional languages or frameworks. These community-driven projects can offer alternative approaches to integration or address specific niche requirements not covered by official offerings.
While community libraries can be valuable, developers should exercise due diligence when incorporating them into production systems. Considerations include:
- Maintenance Status: Is the library actively maintained and updated to reflect the latest API changes?
- Security: Has the code been reviewed for potential vulnerabilities, especially concerning API key handling or data transmission?
- Documentation: Is there sufficient documentation to understand how to use the library effectively?
- API Version Compatibility: Does the library support the specific version of the FullContact API you intend to use?
Developers looking for community contributions may explore platforms like GitHub by searching for "FullContact API" along with their preferred programming language. These repositories often include README files with installation and usage instructions, as well as indications of project activity. Although apispine does not endorse specific community projects, community contributions can sometimes bridge gaps for less common programming environments, fostering broader API adoption.