Skip to main content

EnvoAPI for Python

Call EnvoAPI from your Python app to look up profiles, companies, posts, jobs, and more. Includes typed sync and async clients.

Requires Python 3.11+.

Install

python -m pip install envoapi

Set your API key

Get a free API key with 100 credits.

Pass your key directly with EnvoAPI(api_key="your-api-key") or AsyncEnvoAPI(api_key="your-api-key"). The ENVOAPI_API_KEY environment variable is optional. An explicitly supplied key takes precedence.

Alternatively, set the environment variable and omit api_key:

# macOS / Linux
export ENVOAPI_API_KEY="your-api-key"
# Windows PowerShell
$env:ENVOAPI_API_KEY="your-api-key"

If you use the environment variable, run your app from the same terminal. Both clients read it automatically when api_key is omitted. Keep your key out of source control.

Make a request

Save as app.py:

from envoapi import EnvoAPI

with EnvoAPI(api_key="your-api-key") as client:
    response = client.profiles.get_posts(username="satyanadella")
    print(response.body.data.posts)
    print(response.body.meta.credit_cost)

Run it:

python app.py

Replace satyanadella with the profile username you want to look up. The with block closes the client when you are done.

Async requests

import asyncio
from envoapi import AsyncEnvoAPI

async def main():
    async with AsyncEnvoAPI(api_key="your-api-key") as client:
        response = await client.profiles.get_posts(username="satyanadella")
        print(response.body.data.posts)

asyncio.run(main())

In an app that already has an event loop, use await inside your async function instead of calling asyncio.run().

Client options

You can also pass a key from your app's configuration. An explicit key overrides ENVOAPI_API_KEY.

from envoapi import EnvoAPI

with EnvoAPI(api_key="your-api-key", timeout=30.0) as client:
    response = client.profiles.get_posts(username="satyanadella")
    print(response.body.data.posts)

Both clients accept the same options. The default timeout is 60 seconds per HTTPX timeout phase; timeout accepts seconds or httpx.Timeout. Use base_url to change the default https://api.envoapi.com, or transport for a custom HTTPX transport.

Handle errors

from envoapi import APIError, EnvoAPI

try:
    with EnvoAPI(api_key="your-api-key") as client:
        response = client.profiles.get_posts(username="satyanadella")
        print(response.body.data.posts)
except APIError as error:
    print(error.status, error.code, str(error), error.request_id)

APIError means the API returned an error. TransportError means the request failed, and DecodeError means the response could not be read in the expected format. All three can be imported from envoapi.

Responses and more methods

  • response.body.data: the result.
  • response.body.meta: request metadata, including credit_cost.
  • response.status and response.headers: HTTP status and headers.
  • response.body.to_dict(): the response body as a dictionary.

Model attributes use snake_case. The SDK does not retry requests or fetch additional pages automatically. For paginated methods, pass the returned continuation cursor to the next call with the same search parameters. Requests use your EnvoAPI credits.

See the method reference for all available calls. For models and enums, use from envoapi import models.

GitHub · Issues · MIT license

Release files for envoapi 0.1.2

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

Source distribution (sdist)

Source distribution for envoapi 0.1.2
File Size Uploaded
envoapi-0.1.2.tar.gz 144.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for envoapi 0.1.2
File Interpreter ABI Platform
envoapi-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 744.0 kB

Release files / envoapi-0.1.2.tar.gz

Download URL envoapi-0.1.2.tar.gz
Size 144.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0eea6a85df52bdfc307487cfd66cefc290f47b2b4e6c376b5064f5ae4f86ed1d
BLAKE2b-256 checksum
How to use checksums
d18e6d1019270cb30e193ec3bc411f7b6587dcead5d872aacce764374ea794d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / envoapi-0.1.2-py3-none-any.whl

Download URL envoapi-0.1.2-py3-none-any.whl
Size 599.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21f6d0b584b6cb5bbbba85caa289b56e8925b17cff05593d5b2702f6e0f5602b
BLAKE2b-256 checksum
How to use checksums
76fbb2ba3295ec128b11cd877d6db002c3818f214d526d47c24aecc51616abe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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