ensemblai
Python client and CLI for EnsemblAI — software ecosystem intelligence for PyPI and npm: download analytics, month-over-month growth, dependency structure, and corporate ownership across millions of packages with multi-year daily history.
Requires a Pro-plan API key. Create an account, subscribe, and mint a key at https://www.ensemblai.com/settings/api-keys. Prefer an AI agent? Connect Claude Code, Cursor, or Codex to the MCP server instead — see https://www.ensemblai.com/docs/agents.
Install
pip install ensemblai # or: uv pip install ensemblai
Quickstart
from ensemblai import Client
ea = Client() # reads ENSEMBLAI_API_KEY from the environment
numpy = ea.package("numpy")
print(numpy["package_name"], numpy.get("latest_downloads"))
for row in ea.top(limit=10, ecosystem="npm"):
print(row)
trend = ea.time_series(["requests", "httpx"], granularity="monthly")
Pass the key explicitly if you'd rather not use the environment:
ea = Client(api_key="ek_live_...", ecosystem="npm")
CLI
export ENSEMBLAI_API_KEY=ek_live_...
ensemblai pkg numpy
ensemblai top --eco npm --limit 10
ensemblai search "http client"
ensemblai compare requests httpx aiohttp
ensemblai companies --limit 20
Methods
| Method | REST endpoint | Returns |
|---|---|---|
package(name) |
GET /v1/packages/{name} |
one package's full profile |
search(query, limit=) |
GET /v1/packages |
matching packages |
top(limit=) |
GET /v1/leaderboards/downloads |
30-day download leaderboard |
compare(names) |
POST /v1/packages/batch |
side-by-side metrics |
time_series(packages, granularity=) |
GET /v1/analytics/time-series |
download history (weekly is Pro+) |
companies(limit=) |
GET /v1/companies |
corporate owners by footprint |
reference(kind) |
GET /v1/reference/{kind} |
valid filter values |
get(path, **params) |
any | escape hatch for the full API |
The full surface is documented in the OpenAPI schema.
Configuration
| Variable | Default | Purpose |
|---|---|---|
ENSEMBLAI_API_KEY |
— | your Pro API key (required) |
ENSEMBLAI_BASE_URL |
https://api.ensemblai.com |
override the API host |
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ensemblai-0.1.0.tar.gz.
File metadata
- Download URL: ensemblai-0.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
911aba4b82f52739e51e2dca3b55d40fd5523eaeccff72c15c90e105ba3ed102
|
|
| MD5 |
295197b72a7679d6d13f5416af2b98ef
|
|
| BLAKE2b-256 |
7c10ab2c24c9d1158ec8ce0dfc9e0f783d2335c3ac6ea4239987e517c3e6db57
|
File details
Details for the file ensemblai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ensemblai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a24fd20172fdb07a57ed681c8c04df8aaa34a320fa0af5d85592f15d96b85731
|
|
| MD5 |
0b7068786730cf3a0a64261f2e6aed58
|
|
| BLAKE2b-256 |
395767645a6e098e91f7d9d7fa921902630ea89936ed9a4b6d6bbcda0c5a2804
|