Developer Documentation
Integrate PillFYI medication data into your applications. Access drugs, drug classes, conditions, side effects, manufacturers, and drug-drug interactions through our free JSON APIs.
API Endpoints
All API endpoints return JSON responses with Content-Type: application/json.
No authentication is required. Free to use. CORS enabled (Access-Control-Allow-Origin: *).
| Endpoint | Description | Cache |
|---|---|---|
GET /api/v1/drugs/ |
List drugs (paginated, filterable by type/form) | 1h |
GET /api/v1/drugs/{slug}/ |
Full drug detail with clinical info, side effects, conditions | 1h |
GET /api/v1/drug-classes/ |
List drug classes (WHO ATC classification) | 1h |
GET /api/v1/drug-classes/{slug}/ |
Drug class detail with child classes and drugs | 1h |
GET /api/v1/conditions/ |
List conditions (filterable by body_system) | 1h |
GET /api/v1/conditions/{slug}/ |
Condition detail with approved drugs | 1h |
GET /api/v1/side-effects/ |
List side effects (filterable by body_system) | 1h |
GET /api/v1/manufacturers/ |
List pharmaceutical manufacturers | 1h |
GET /api/v1/search/?q= |
Search across drugs, conditions, side effects, drug classes | 5m |
GET /api/v1/interaction-check/?drugs= |
Check drug-drug interactions (2-10 drugs) | none |
GET /api/v1/openapi.json |
OpenAPI 3.1.0 spec (CORS enabled) | none |
Search API
/api/v1/search/?q={query}
curl "https://pillfyi.com/api/v1/search/?q=ibuprofen"
{
"results": [
{"name": "Ibuprofen", "slug": "ibuprofen", "type": "drug", "url": "/drug/ibuprofen/"},
{"name": "Ibuprofen Lysine", "slug": "ibuprofen-lysine", "type": "drug", "url": "/drug/ibuprofen-lysine/"}
],
"total": 2
}
Drug Detail
/api/v1/drugs/{slug}/
curl "https://pillfyi.com/api/v1/drugs/ibuprofen/"
{
"name": "Ibuprofen",
"slug": "ibuprofen",
"url": "/drug/ibuprofen/",
"brand_names": ["Advil", "Motrin"],
"drug_type": "otc",
"drug_type_display": "Over-the-Counter",
"drug_class": {"name": "Propionic acid derivatives", "slug": "propionic-acid-derivatives", "atc_code": "M01AE"},
"active_ingredients": [{"name": "Ibuprofen", "strength": "200mg"}],
"indications": "For temporary relief of minor aches and pains...",
"dosage_form": "tablet",
"side_effects": [
{"name": "Nausea", "slug": "nausea", "frequency": "common", "incidence_rate": 3.5}
],
"conditions": [
{"name": "Pain", "slug": "pain", "indication_type": "approved"}
]
}
Drug List (Paginated)
/api/v1/drugs/?page=1&per_page=20&type=prescription
curl "https://pillfyi.com/api/v1/drugs/?page=1&per_page=5&type=otc"
{
"results": [
{"name": "Acetaminophen", "slug": "acetaminophen", "url": "/drug/acetaminophen/", "drug_type": "otc", ...},
{"name": "Aspirin", "slug": "aspirin", "url": "/drug/aspirin/", "drug_type": "otc", ...}
],
"count": 142,
"page": 1,
"per_page": 5,
"total_pages": 29
}
Interaction Check
Check for drug-drug interactions between 2-10 medications. Pass multiple drugs query parameters.
/api/v1/interaction-check/?drugs={slug}&drugs={slug}
curl "https://pillfyi.com/api/v1/interaction-check/?drugs=warfarin&drugs=aspirin"
{
"interactions": [
{
"drug_a": "Aspirin",
"drug_a_slug": "aspirin",
"drug_b": "Warfarin",
"drug_b_slug": "warfarin",
"severity": "major",
"clinical_effect": "Increased risk of bleeding...",
"management": "Avoid concurrent use..."
}
]
}
AI / LLM Integration
PillFYI provides machine-readable content summaries following the
llms.txt
standard. Every page also supports .md suffix
for Markdown-formatted content.
A concise summary of PillFYI's content structure and key pages. Designed for AI models to quickly understand what the site offers.
Append .md to any page URL to get a Markdown-formatted version.
curl "https://pillfyi.com/drug/ibuprofen/.md"
curl "https://pillfyi.com/drugs/.md"
curl "https://pillfyi.com/conditions/.md"
AI Crawler Policy: Our robots.txt explicitly allows GPTBot, ClaudeBot, and Google-Extended crawlers.
SEO & Standards
| Endpoint | Standard | Description |
|---|---|---|
| /sitemap.xml | Sitemaps 0.9 | Sitemap index with per-section sitemaps |
| /robots.txt | REP | Crawler directives with AI bot permissions |
| /.well-known/security.txt | RFC 9116 | Security vulnerability reporting contact |
Structured Data
- Drug — medication pages with clinical information
- MedicalCondition — condition pages with approved treatments
- BreadcrumbList — navigation breadcrumbs on all pages
- WebSite — with SearchAction for sitelinks search box
Internationalization
All content pages include hreflang
alternate links for 15 languages.
OpenAPI Specification
A machine-readable OpenAPI 3.1.0 specification is available. Use it with Swagger UI, Postman, or code generators.
Download openapi.json# Download the OpenAPI spec
curl "https://pillfyi.com/api/v1/openapi.json" -o openapi.json
# Pretty-print
curl -s "https://pillfyi.com/api/v1/openapi.json" | python -m json.tool
Rate Limits & Usage
Our APIs are free to use with no authentication required. To ensure fair access:
- Keep requests under 60 requests per minute per IP address
- Include a descriptive
User-Agentheader - Cache responses locally — API responses include
Cache-Controlheaders - For bulk data, use the sitemap to discover all URLs
For higher-volume access or integration questions, reach out via security.txt.
Quick Reference
/api/v1/drugs/
/api/v1/drugs/{slug}/
/api/v1/drug-classes/
/api/v1/conditions/
/api/v1/side-effects/
/api/v1/manufacturers/
/api/v1/search/?q=...
/api/v1/interaction-check/
/api/v1/openapi.json
/llms.txt