Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

enrichlayer-api - The official Python client for Enrich Layer API to enrich professional profiles

PyPI version Python Support GitLab Repository GitHub Mirror License: MIT

What is Enrich Layer?

Enrich Layer is an enrichment API to fetch fresh data on people and businesses. We are a fully-managed API that sits between your application and raw data so that you can focus on building the application; instead of worrying about building a web-scraping team and processing data at scale.

With Enrich Layer, you can programmatically:

  • Enrich profiles on people and companies
  • Lookup people and companies
  • Lookup contact information on people and companies
  • Check if an email address is of a disposable nature
  • And more..

Visit Enrich Layer's website for more details.

Before you install

You should understand that enrichlayer-api was designed with concurrency as a first class citizen from ground-up. To install enrichlayer-api, you have to pick a concurrency model.

We support the following concurrency models:

The right way to use Enrich Layer API is to make API calls concurrently. In fact, making API requests concurrently is the only way to achieve a high rate of throughput. On the default rate limit, you can enrich up to 432,000 profiles per day. See this blog post for context.

Installation and supported Python versions

enrichlayer-api is available on PyPi. For which you can install into your project with the following command:

# install enrichlayer-api with asyncio
$ pip install 'enrichlayer-api[asyncio]'

# install enrichlayer-api with gevent
$ pip install 'enrichlayer-api[gevent]'

# install enrichlayer-api with twisted
$ pip install 'enrichlayer-api[twisted]'

enrichlayer-api is tested on Python 3.8, 3.9, 3.10, 3.11, and 3.12.

Initializing enrichlayer-api with an API Key

You can get an API key by registering an account with Enrich Layer. The API Key can be retrieved from the dashboard.

To use Enrich Layer with the API Key:

  • You can run your script with the ENRICHLAYER_API_KEY environment variable set.
  • Or, you can pass the API key directly when initializing the client.

Usage with examples

I will be using enrichlayer-api with the asyncio concurrency model to illustrate some examples on what you can do with Enrich Layer and how the code will look with this library.

For examples with other concurrency models such as:

  • gevent, see examples/lib-gevent.py.
  • twisted, see examples/lib-twisted.py.

Enrich a Person Profile

Given a Professional Profile URL, you can get the entire profile back in structured data with Enrich Layer's Person Profile API Endpoint.

from enrichlayer_client.asyncio import EnrichLayer, do_bulk
import asyncio

enrichlayer = EnrichLayer(api_key='your-api-key')
person = asyncio.run(enrichlayer.person.get(
    linkedin_profile_url='https://www.linkedin.com/in/williamhgates/'
))
print('Person Result:', person)

Enrich a Company Profile

Given a Company Profile URL, enrich the URL with it's full profile with Enrich Layer's Company Profile API Endpoint.

company = asyncio.run(enrichlayer.company.get(
    url='https://www.linkedin.com/company/tesla/'
))
print('Company Result:', company)

Lookup a person

Given a first name and a company name or domain, lookup a person with Enrich Layer's Person Lookup API Endpoint.

lookup_results = asyncio.run(enrichlayer.person.resolve(
    first_name="bill", 
    last_name="gates", 
    company_domain="microsoft.com"
))
print('Person Lookup Result:', lookup_results)

Lookup a company

Given a company name or a domain, lookup a company with Enrich Layer's Company Lookup API Endpoint.

company_lookup_results = asyncio.run(enrichlayer.company.resolve(
    company_name="microsoft", 
    company_domain="microsoft.com"
))
print('Company Lookup Result:', company_lookup_results)

Lookup a Profile URL from a work email address

Given a work email address, lookup a Profile URL with Enrich Layer's Reverse Work Email Lookup Endpoint.

lookup_results = asyncio.run(enrichlayer.person.resolve_by_email(
    email="anthony.tan@grab.com",
    lookup_depth="deep"
))
print('Reverse Work Email Lookup Result:', lookup_results)

Enrich professional profiles in bulk (from a CSV)

Given a CSV file with a list of professional profile URLs, you can enrich the list in the following manner:

# PROCESS BULK WITH CSV
import csv

bulk_person_data = []
with open('sample.csv', 'r') as file:
    reader = csv.reader(file)
    next(reader, None)
    for row in reader:
        bulk_person_data.append(
            (enrichlayer.person.get, {'linkedin_profile_url': row[0]})
        )
results = asyncio.run(do_bulk(bulk_person_data))

print('Bulk:', results)

More asyncio examples

More asyncio examples can be found at examples/lib-asyncio.py

Rate limit and error handling

There is no need for you to handle rate limits (429 HTTP status error). The library handles rate limits automatically with exponential backoff.

However, there is a need for you to handle other error codes. Errors will be returned in the form of EnrichLayerException. The list of possible errors is listed in our API documentation.

API Endpoints and their corresponding documentation

Here we list the available API endpoints and their corresponding library functions. Do refer to each endpoint's relevant API documentation to find out the required arguments that needs to be fed into the function.

General

Function Endpoint Credits
get_balance() View Credit Balance Endpoint 0

Person API

Function Endpoint Credits
person.get(**kwargs) Person Profile Endpoint 1
person.search(**kwargs) Person Search Endpoint 10
person.resolve(**kwargs) Person Lookup Endpoint 2
person.resolve_by_email(**kwargs) Reverse Work Email Lookup Endpoint 1
person.resolve_by_phone(**kwargs) Reverse Phone Lookup Endpoint 1
person.lookup_email(**kwargs) Work Email Lookup Endpoint 1
person.personal_contact(**kwargs) Personal Contact Number Lookup Endpoint 1
person.personal_email(**kwargs) Personal Email Lookup Endpoint 1
person.profile_picture(**kwargs) Profile Picture Endpoint 0

Company API

Function Endpoint Credits
company.get(**kwargs) Company Profile Endpoint 1
company.search(**kwargs) Company Search Endpoint 10
company.resolve(**kwargs) Company Lookup Endpoint 2
company.find_job(**kwargs) Job Listings Endpoint 2
company.job_count(**kwargs) Job Count Endpoint 1
company.employee_count(**kwargs) Employee Count Endpoint 1
company.employee_list(**kwargs) Employee Listing Endpoint 1
company.employee_search(**kwargs) Employee Search Endpoint 3
company.role_lookup(**kwargs) Role Lookup Endpoint 3
company.profile_picture(**kwargs) Company Profile Picture Endpoint 0

School API

Function Endpoint Credits
school.get(**kwargs) School Profile Endpoint 1
school.student_list(**kwargs) Student Listing Endpoint 1

Job API

Function Endpoint Credits
job.get(**kwargs) Job Profile Endpoint 1

Customer API

Function Endpoint Credits
customers.listing(**kwargs) Customer Listing Endpoint 1

Proxycurl-py Compatibility

For users migrating from proxycurl-py, enrichlayer-api provides a compatibility layer that allows existing code to work unchanged while using the new EnrichLayer backend.

Prerequisites

Both packages must be installed:

pip install enrichlayer-api
pip install proxycurl-py

Usage

Enable compatibility mode in your existing code by adding one import line:

from enrichlayer_client.compat import enable_proxycurl_compatibility
enable_proxycurl_compatibility()

# Now your existing proxycurl-py code works unchanged
from proxycurl.asyncio import Proxycurl, do_bulk
proxycurl = Proxycurl(api_key='your-enrichlayer-api-key')

# All existing methods work exactly the same
person = asyncio.run(proxycurl.linkedin.person.get(
    linkedin_profile_url='https://www.linkedin.com/in/williamhgates/'
))
company = asyncio.run(proxycurl.linkedin.company.get(
    url='https://www.linkedin.com/company/apple'
))

Configuration Options

# Enable with deprecation warnings
enable_proxycurl_compatibility(deprecation_warnings=True)

# Then use proxycurl as normal, passing API key to constructor
from proxycurl.gevent import Proxycurl
client = Proxycurl(api_key='your-enrichlayer-api-key')

Migration Path

  1. Immediate: Add compatibility import to existing code
  2. Gradual: Replace imports one by one:
    # Old: from proxycurl.asyncio import Proxycurl
    # New: from enrichlayer_client.asyncio import EnrichLayer as Proxycurl
    
  3. Complete: Use the new direct API structure:
    # Old: proxycurl.linkedin.person.get(...)
    # New: enrichlayer.person.get(...)
    

Environment Variables

The compatibility layer supports both old and new environment variables:

  • PROXYCURL_API_KEY (legacy)
  • ENRICHLAYER_API_KEY (new)

Benefits

  • Zero Breaking Changes: Existing code works immediately
  • Modern Backend: Benefits from improved EnrichLayer infrastructure
  • Flexible Migration: Migrate at your own pace
  • Future-Proof: Easy path to new API structure

Error Handling

The compatibility layer automatically maps EnrichLayerException to ProxycurlException to maintain error handling compatibility.

Dependency Management

The compatibility module gracefully handles missing optional dependencies:

  • Works with only asyncio installed (default)
  • Automatically detects and uses gevent if available
  • Automatically detects and uses twisted if available
  • Provides clear error messages if proxycurl-py is not installed

For more information, visit the Enrich Layer documentation or contact our support team at support@enrichlayer.com.

Metadata

Release files for enrichlayer-api 0.1.0rc3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for enrichlayer-api 0.1.0rc3
File Size Uploaded Provenance Actions
enrichlayer_api-0.1.0rc3.tar.gz 61.9 kB Without provenance Details for enrichlayer_api-0.1.0rc3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for enrichlayer-api 0.1.0rc3
File Interpreter ABI Platform Actions
enrichlayer_api-0.1.0rc3-py3-none-any.whl Python 3 none any Details for enrichlayer_api-0.1.0rc3-py3-none-any.whl

Total release size: 124.4 kB

Release files / enrichlayer_api-0.1.0rc3.tar.gz

Download URL enrichlayer_api-0.1.0rc3.tar.gz
Size 61.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a7e3e5f88275125fe43c8f6d61c89f254cb09096a76e84cc5fa1929e96d7f6e
BLAKE2b-256 checksum
How to use checksums
3df8bad93d0ffd34d197d0faa5f18bdfd8fb4c1f980bb6f1231668e75b353ff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.13.2 Linux/6.13.6-200.fc41.x86_64

Release files / enrichlayer_api-0.1.0rc3-py3-none-any.whl

Download URL enrichlayer_api-0.1.0rc3-py3-none-any.whl
Size 62.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f83dbb00bcee0c8226ac2893d1592cb3d399307cbb399cec7889d99726f3e2f0
BLAKE2b-256 checksum
How to use checksums
12493d6adb07ad766c2eeea810ffd9a8f49856aa43877004ff3e7ca63ff7ad43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.13.2 Linux/6.13.6-200.fc41.x86_64

Security for enrichlayer-api 0.1.0rc3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page