PyPI API: Search packages
Searches PyPI by keywords and returns matching packages in relevance order, each with its latest version and that version's release date. Returns up to 100 results.
Unofficial. Not affiliated with or endorsed by PyPI.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Query, required
query Keywords to find packages, for example pdf parsing.
pdf parsing
- Max Results optional
max_results Maximum packages to return, for example 25.
25
Whole number from 1 to 100. Default
20.
Input as JSON
{ "query": "pdf parsing", "max_results": 25}Output
{ "packages": [ { "name": "parsing", "pypi_link": "https://pypi.org/project/parsing/" , "description": "LR(1) parser generator for Python and CFSM and GLR parser drivers", "release_date": "2023-11-24", "latest_version": "2.0.4" }, { "name": "shinny-parsing", "pypi_link": "https://pypi.org/project/shinny-parsing/" , "description": "parse settlement file", "release_date": "2024-12-03", "latest_version": "0.0.4" }, { "name": "argument-parsing", "pypi_link": "https://pypi.org/project/argument-parsing/" , "description": "A zero dependency argument parser written in python.", "release_date": "2024-05-16", "latest_version": "1.0.1" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"pypi.org/search_packages","input":{"query":"pdf parsing","max_results":25}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "pypi.org/search_packages" , "input": { "query": "pdf parsing", "max_results": 25 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "pypi.org/search_packages" , "input": { "query": "pdf parsing", "max_results": 25 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run pypi.org/search_packages# with {"query":"pdf parsing","max_results":25}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "query": { "type": "string", "minLength": 1, "description": "Keywords to find packages, for example pdf parsing." }, "max_results": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1, "description": "Maximum packages to return, for example 25." } }}Output schema
{ "type": "object", "required": [ "packages" ], "properties": { "packages": { "type": "array", "items": { "type": "object", "required": [ "name", "latest_version", "description", "release_date", "pypi_link" ], "properties": { "name": { "type": "string" }, "pypi_link": { "type": "string", "format": "uri" }, "description": { "type": [ "string", "null" ] }, "release_date": { "type": [ "string", "null" ], "format": "date" }, "latest_version": { "type": [ "string", "null" ] } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
pypi.org/search_packages- Returns
- name, latest version, description, release date, PyPI link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method pypi.org/search_packages with the inputs above.
Ask your agent
- Find Python packages for parsing PDF files and show me their latest versions and release dates
- Search PyPI for async HTTP client libraries, top 10 results
- What libraries exist for reading and writing Excel spreadsheets in Python? Give me up to 30 with descriptions
- Look up packages matching 'telegram bot framework' on pypi.org and include links to each one
- I need a list of 50 Python libraries related to geospatial raster processing, with when each was last released
See more
All PyPI methodsGets a PyPI package's current version, release date, metadata, project links and its 10 most recently published versions from a package name or PyPI link.
pypi.org/get_packageSearches the npm registry for JavaScript packages by description or keywords, in npm's search order, and returns each package's latest version, weekly downloads and publish date.
npmjs.com/search_packagesFinds Pinterest pins for an idea in search order, with image, creator, board, saves and linked website. Limited to the first public search page.
pinterest.com/search_pinsFinds Rust crates on crates.io by keywords, sorted by relevance, total downloads, recent downloads, or newest creation.
crates.io/search_cratesFinds Product Hunt products by name or by what they do, in Product Hunt search order, with tagline, review rating, review count, followers and topics. Ratings are null for products without reviews.
producthunt.com/search_productsFinds Android apps on Google Play by keywords, in Play search order, with each listing's developer, star rating, price and currency for the chosen country, download range and link. Results are limited to apps shown on the public search page.
play.google.com/search_appsFinds public GitHub repositories by keywords, with an optional language filter and sort order. Returns up to 100 matches.
github.com/search_repositoriesSearches Bing and returns web results in the order shown, with snippets, answer-box text when available, and related searches.
bing.com/search_web