Proxycurl 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 Proxycurl, you can programatically:
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
You should understand that proxycurl-py was designed with concurrency as a first class citizen from ground-up. To install proxycurl-py, you have to pick a concurency model.
The right way to use Proxycurl 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
proxycurl-py is available on PyPi. For which you can install into your project with the following command:
# install proxycurl-py with asyncio
$ pip install 'proxycurl-py[asyncio]'
# install proxycurl-py with gevent
$ pip install 'proxycurl-py[gevent]'
# install proxycurl-py with twisted
$ pip install 'proxycurl-py[twisted]'
proxycurl-py is tested on Python 3.7, 3.8 and 3.9.
Initializing proxycurl-py with an API Key
You can get an API key by registering an account with Proxycurl. The API Key can be retrieved from the dashboard.
To use Proxycurl with the API Key:
You can run your script with the PROXYCURL_API_KEY environment variable set.
Or, you can prepend your script with the API key injected into the environment. See proxycurl/config.py for an example.
Usage with examples
I will be using proxycurl-py with the asyncio concurrency model to illustrate some examples on what you can do with Proxycurl and how the code will look with this library.
Forexamples with other concurrency models such as:
gevent, see examples/lib-gevent.py.
twisted, see examples/lib-twisted.
Enrich a Person Profile
Given a LinkedIn Member Profile URL, you can get the entire profile back in structured data with Proxycurl's Person Profile API Endpoint.
from proxycurl.asyncio import Proxycurl, do_bulk
import asyncio
import csv
proxycurl = Proxycurl()
person = asyncio.run(proxycurl.linkedin.person.get(
url='https://www.linkedin.com/in/williamhgates/'
))
print('Person Result:', person)
Enrich a Company Profile
Given a LinkedIn Company Profile URL, enrich the URL with it's full profile with Proxycurl's Company Profile API Endpoint.
company = asyncio.run(proxycurl.linkedin.company.get(
url='https://www.linkedin.com/company/tesla-motors'
))
print('Company Result:', company)
Lookup a person
Given a first name and a company name or domain, lookup a person with Proxycurl's Person Lookup API Endpoint.
However, there is a need for you to handle other error codes. Errors will be returned in the form of ProxycurlException. The list of possible errors is listed in our API documentation.
API Endpoints and their corresponding documentation
Here we list the possible 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.