SDKs overview

FullContact provides Software Development Kits (SDKs) and client libraries designed to simplify interaction with its various APIs, including the Person API, Company API, and Address API. These SDKs abstract the underlying HTTP requests, authentication mechanisms, and response parsing, allowing developers to integrate data enrichment and identity resolution functionalities more efficiently into their applications. The official SDKs are supported across several popular programming languages, ensuring broad compatibility for different development environments. Community-contributed libraries also extend the reach and flexibility of FullContact API integrations.

Using an SDK generally involves initializing a client with an API key, making method calls that correspond to API endpoints, and processing the structured data returned. This approach reduces boilerplate code and potential errors when compared to manual HTTP client implementations. FullContact's developer documentation provides comprehensive guides and reference materials for each supported SDK and the API endpoints they interact with.

Official SDKs by language

FullContact maintains official SDKs for a range of programming languages, ensuring direct support and compatibility with the latest API versions. These SDKs are the recommended method for integrating FullContact services due to their active maintenance and feature parity with the core API functionality. Each SDK is tailored to the conventions and best practices of its respective language, providing a native development experience.

Language Package/Module Install Command Maturity Documentation Link
Python fullcontact pip install fullcontact Stable FullContact Python SDK Reference
Node.js @fullcontact/fullcontact-node npm install @fullcontact/fullcontact-node Stable FullContact Node.js SDK Reference
Ruby fullcontact gem install fullcontact Stable FullContact Ruby SDK Reference
PHP fullcontact/fullcontact composer require fullcontact/fullcontact Stable FullContact PHP SDK Reference
Java com.fullcontact:fullcontact-java Maven/Gradle dependency Stable FullContact Java SDK Reference
.NET FullContact.NET Install-Package FullContact.NET Stable FullContact .NET SDK Reference

Installation

Installing a FullContact SDK typically follows the standard package management practices for each programming language. Below are common installation commands for the main official SDKs. Developers should consult the specific SDK documentation for detailed instructions, including any prerequisites or configuration steps.

Python

The Python SDK is distributed via PyPI and can be installed using pip:

pip install fullcontact

Node.js

The Node.js SDK is available on npm:

npm install @fullcontact/fullcontact-node

Ruby

For Ruby projects, the SDK can be added as a gem:

gem install fullcontact

PHP

The PHP SDK is managed with Composer:

composer require fullcontact/fullcontact

Java

For Java applications, the SDK is typically included as a dependency in your build tool (e.g., Maven or Gradle). Here's an example for Maven:

<dependency>
    <groupId>com.fullcontact</groupId>
    <artifactId>fullcontact-java</artifactId>
    <version>[latest-version]</version>
</dependency>

Refer to the FullContact Java SDK documentation for the latest version and Gradle instructions.

.NET

The .NET SDK is available via NuGet:

Install-Package FullContact.NET

For additional details on installation and setup, including managing API keys, refer to the FullContact Getting Started guide.

Quickstart example

This example demonstrates how to use the FullContact Python SDK to enrich person data using an email address. This is a common task for lead qualification or personalizing customer communications. Ensure you have your FullContact API key ready.

First, set your API key as an environment variable or directly in your code (for development purposes).

import os
from fullcontact import FullContactClient

# It's recommended to store your API key securely, e.g., in an environment variable
# For demonstration, replace 'YOUR_FULLCONTACT_API_KEY' with your actual key
api_key = os.environ.get('FULLCONTACT_API_KEY', 'YOUR_FULLCONTACT_API_KEY')

# Initialize the FullContact client
client = FullContactClient(api_key=api_key)

# Define the email to enrich
email_to_enrich = "[email protected]"

try:
    # Call the Person API to enrich data by email
    response = client.person.match(email=email_to_enrich)

    # Check if the API call was successful and data was found
    if response.status_code == 200 and response.body:
        data = response.body
        print(f"Enriched data for {email_to_enrich}:")
        print(f"  Full Name: {data.get('fullName', 'N/A')}")
        print(f"  Demographics: {data.get('demographics', {}).get('gender', 'N/A')}, {data.get('demographics', {}).get('ageRange', 'N/A')}")
        if 'organizations' in data and data['organizations']:
            print(f"  Organization: {data['organizations'][0].get('name', 'N/A')}")
        if 'contactInfo' in data and 'websites' in data['contactInfo'] and data['contactInfo']['websites']:
            print(f"  Website: {data['contactInfo']['websites'][0].get('url', 'N/A')}")
        # For a full view of the data, you can print the entire response body
        # print(json.dumps(data, indent=2))
    elif response.status_code == 404:
        print(f"No data found for {email_to_enrich}.")
    else:
        print(f"Error enriching data (Status: {response.status_code}): {response.text}")

except Exception as e:
    print(f"An error occurred: {e}")

This snippet demonstrates basic client initialization, making an API call, and accessing key fields from the Person API response. For advanced usage, including handling various response types and error codes, refer to the FullContact Person Enrichment API reference.

Community libraries

Beyond the officially supported SDKs, the FullContact API ecosystem benefits from community-driven libraries and integrations. These resources can offer alternative approaches, support for less common languages, or pre-built connectors for specific platforms. While not officially maintained by FullContact, community libraries can sometimes provide quick solutions for niche requirements or serve as examples for custom integrations. Developers should exercise due diligence when using community-contributed code, verifying its security, maintenance status, and compatibility with the latest API versions.

For example, a developer might find community-contributed wrappers for languages like Go or Rust, or integrations with specific web frameworks that are not covered by official SDKs. Resources such as GitHub and package managers for specific languages (e.g., PyPI for Python, npm for Node.js) are common places to discover such libraries. It is important to review the documentation and source code of any community library to ensure it meets project requirements and adheres to best practices for API consumption, as outlined by organizations like the World Wide Web Consortium (W3C) for web standards.

Developers interested in contributing to the FullContact API ecosystem can also build and share their own client libraries. Such contributions often include features like advanced error handling, asynchronous request patterns, or specific data model mappings that align with particular application architectures.