{"openapi":"3.1.0","info":{"title":"OrphanDrug API","version":"1.0.0","summary":"Orphan drugs, rare diseases, regulatory pathways and access programs, as structured JSON.","description":"Read-only, CORS-open REST API behind www.orphandrug.app, a knowledge base of orphan and rare-disease\nmedicines operated by GNH India Pharmaceuticals Limited.\n\nAll responses use the envelope `{ success: boolean, data: ..., meta?: ... }`.\nPaginated endpoints return `meta` with `total`, `page`, `limit` and `totalPages`.\n\nRecords of every editorial status are returned unless you pass `status=published`.\n\nRead access needs no authentication, no API key, and has no rate limit. Write verbs exist on\nthese routes but are not public — they return 401 without an admin session. There is no\npublic write path and no ordering API. Please identify your agent in the User-Agent header.\nData is compiled from public regulatory sources (FDA, EMA, Orphanet) and is not medical advice.\nProcurement and pricing are handled by humans — see /agents.txt.","contact":{"name":"GNH India Pharmaceuticals Limited","url":"https://www.orphandrug.app/about","email":"info@gnhindia.com"},"license":{"name":"CC-BY-4.0","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://www.orphandrug.app/api/v1","description":"Production"}],"externalDocs":{"description":"Human-readable API docs","url":"https://www.orphandrug.app/api-docs"},"paths":{"/drugs":{"get":{"summary":"List drugs","description":"`search` matches `generic_name` only.","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the primary name field"},{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100}},{"name":"orphan","in":"query","schema":{"type":"integer","enum":[0,1]},"description":"Filter by orphan-designation status"},{"name":"status","in":"query","schema":{"type":"string","enum":["published","draft"]},"description":"Filter by editorial status. Omit to return records of every status."}],"responses":{"200":{"description":"Paginated list","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drugs/{id}":{"get":{"summary":"Get a drug by id or slug","description":"The `id` path segment accepts either the UUID or the URL slug. Includes treated diseases, country availability with regulatory pathway, access programs, suppliers, and a schema.org Drug object as `jsonLd`. `brand_name` is omitted from this response.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"a drug with related records","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/diseases":{"get":{"summary":"List diseases","description":"`search` matches `name` only.","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the primary name field"},{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100}},{"name":"status","in":"query","schema":{"type":"string","enum":["published","draft"]},"description":"Filter by editorial status. Omit to return records of every status."}],"responses":{"200":{"description":"Paginated list","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/diseases/{id}":{"get":{"summary":"Get a disease by id or slug","description":"The `id` path segment accepts either the UUID or the URL slug. Includes the drugs known to treat it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"a disease with related records","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/countries":{"get":{"summary":"List countries","description":"Not paginated — returns every matching country, ordered by name.","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Substring match on country name"},{"name":"region","in":"query","schema":{"type":"string"},"description":"Exact match on region"}],"responses":{"200":{"description":"Full list (this endpoint is not paginated)","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/countries/{id}":{"get":{"summary":"Get a country by id or slug","description":"The `id` path segment accepts either the UUID or the URL slug. Includes available drugs and linked regulatory pathways.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"a country with related records","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/regulatory-pathways":{"get":{"summary":"List regulatory pathways","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the primary name field"},{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100}}],"responses":{"200":{"description":"Paginated list","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/regulatory-pathways/{id}":{"get":{"summary":"Get a regulatory pathway by id or slug","description":"The `id` path segment accepts either the UUID or the URL slug. Includes linked countries and the suppliers who execute it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"a regulatory pathway with related records","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/access-programs":{"get":{"summary":"List access programs","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the primary name field"},{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100}},{"name":"type","in":"query","schema":{"type":"string"},"description":"Exact match on program type, e.g. expanded-access"}],"responses":{"200":{"description":"Paginated list","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/access-programs/{id}":{"get":{"summary":"Get an access program by id or slug","description":"The `id` path segment accepts either the UUID or the URL slug. Includes the drugs it covers and the suppliers who handle it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"an access program with related records","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppliers":{"get":{"summary":"List suppliers","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on the primary name field"},{"name":"page","in":"query","schema":{"type":"integer","default":1,"minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"minimum":1,"maximum":100}}],"responses":{"200":{"description":"Paginated list","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/suppliers/{id}":{"get":{"summary":"Get a supplier by id or slug","description":"The `id` path segment accepts either the UUID or the URL slug. Includes the access programs and regulatory pathways they handle.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"a supplier with related records","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"get":{"summary":"Cross-entity search","description":"Substring search across drugs (generic and brand name), diseases, countries, pathways and access programs. Capped at 5 results per group. Suppliers are not searched.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Results grouped by entity type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"drugs":{"type":"array","items":{"type":"object"}},"diseases":{"type":"array","items":{"type":"object"}},"countries":{"type":"array","items":{"type":"object"}},"pathways":{"type":"array","items":{"type":"object"}},"accessPrograms":{"type":"array","items":{"type":"object"}}}}}}}}},"400":{"description":"q is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stats":{"get":{"summary":"Entity counts","description":"Total row counts across all editorial statuses, not published-only.","responses":{"200":{"description":"Counts","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"drugs":{"type":"integer"},"diseases":{"type":"integer"},"countries":{"type":"integer"},"pathways":{"type":"integer"},"programs":{"type":"integer"},"suppliers":{"type":"integer"}}}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"PageMeta":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"},"totalPages":{"type":"integer"}}},"Error":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"string"}}}}}}