# `pypi__get_top_downloaded_packages`

Get the most downloaded PyPI packages.

This tool retrieves a list of the most popular Python packages by download count,
helping you discover trending and widely-used packages in the Python ecosystem.

Args:
period: Time period for download ranking ('day', 'week', 'month', default: 'month')
limit: Maximum number of packages to return (default: 20, max: 50)

Returns:
Dictionary containing top packages information including:
\- Ranked list of packages with download counts
\- Package metadata and repository links
\- Period and ranking information
\- Data source and limitations

Note:
Due to API limitations, this tool provides results based on known popular packages.
For comprehensive data analysis, consider using Google BigQuery with PyPI datasets.

- Server: [PyPI](https://gateway.mcpharbor.dev/docs/servers/pypi) (`dev.mcpharbor.gateway/pypi`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/pypi`
- Upstream tool: exposed by the provider; called through this gateway as `pypi__get_top_downloaded_packages`
- Provider terms: <https://policies.python.org/pypi.org/Terms-of-Service/> (verified 2026-09-19)
- Upstream API documentation: <https://docs.pypi.org/api/json/>
- Rate limit: 600 requests per minute

## Parameters

- `limit` (integer, optional): Default: `20`.
- `period` (string, optional): Default: `month`.

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: pypi__get_top_downloaded_packages
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "limit": 1
    },
    "name": "pypi__get_top_downloaded_packages"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider asks for no attribution. Their terms still apply: see the table above.

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "description": "Get the most downloaded PyPI packages.\n\nThis tool retrieves a list of the most popular Python packages by download count,\nhelping you discover trending and widely-used packages in the Python ecosystem.\n\nArgs:\n    period: Time period for download ranking ('day', 'week', 'month', default: 'month')\n    limit: Maximum number of packages to return (default: 20, max: 50)\n\nReturns:\n    Dictionary containing top packages information including:\n    - Ranked list of packages with download counts\n    - Package metadata and repository links\n    - Period and ranking information\n    - Data source and limitations\n\nNote:\n    Due to API limitations, this tool provides results based on known popular packages.\n    For comprehensive data analysis, consider using Google BigQuery with PyPI datasets.",
  "inputSchema": {
    "properties": {
      "limit": {
        "default": 20,
        "type": "integer"
      },
      "period": {
        "default": "month",
        "type": "string"
      }
    },
    "type": "object"
  },
  "name": "pypi__get_top_downloaded_packages",
  "outputSchema": {
    "additionalProperties": true,
    "type": "object"
  }
}
```
