PBS API

by matthewdcage

4 stars
177 downloads
Not rated
GitHub

About

🐍 ☁️ Access Australian Pharmaceutical Benefits Scheme data for medicine information, pricing, and availability. Built with Python and FastAPI.

Details

Author
matthewdcage
GitHub stars
4
Downloads
177
Categories
Search, Community, Other, Developer Tools

- Provides tools for querying PBS API endpoints.
- Supports both stdio and HTTP/SSE transport layers.
- Comprehensive error handling for rate limits and authentication.
- Processes natural language prompts about medication information.
- Returns structured pharmaceutical data for LLM use.
- Can be used as a standalone CLI tool.

Clone the repository, install dependencies with npm install, and build with npm run build. Run the server in stdio mode (npm start), HTTP/SSE mode (npm run start:http), or as a command-line tool (npm run cli -- <command>). Configure an MCP client (e.g., Claude Desktop) by providing the path to the built server and your PBS API subscription key in the client’s mcpServers configuration.

Obtaining a PBS API Subscription Key

To obtain your own PBS API subscription key, follow these steps:

1. Visit the PBS Data API Portal:
- Go to https://data-api-portal.health.gov.au/

2. Create an Account:
- Click on "Sign Up" to create a new account
- Fill in your details and verify your email address

3. Subscribe to the PBS API:
- Once logged in, navigate to the "Products" section
- Select the "PBS Public API v3" product
- Click "Subscribe" to request access to the API

4. Retrieve Your Subscription Key:
- After your subscription is approved, go to your profile
- Navigate to "Subscriptions" or "API Keys" section
- Copy your primary or secondary key

5. Configure Your Environment:
- Create a .env file based on the .env.example template
- Replace your-subscription-key-here with your actual subscription key:

     PBS_API_SUBSCRIPTION_KEY=your-actual-subscription-key

Note: The PBS Public API is rate-limited to one request per 20 seconds. This limit is shared among all users of the public API. For higher rate limits or access to embargo data (future schedules), you may need to apply for special access through the PBS Developer Program.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.