{"openapi":"3.1.0","info":{"title":"Open FDA Drug Reference (BYOK) API","version":"0.1.0","description":"Open FDA Drug Reference (BYOK) lets an AI assistant read your own Open FDA Drug Reference data through the Open FDA Drug Reference API with a key you supply (openFDA API key). Read-only: 5 tools (search_drug_ndc_directory, search_drugsfda_applications, search_ndc_spl_data_elements, search_substance_records, count_drug_reference_records). The BYOK key travels with each request, is used for that...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-openfda-drug-reference.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-openfda-drug-reference/docs"},"termsOfService":"https://connectorbay.com/byok-openfda-drug-reference/terms"},"servers":[{"url":"https://byok-openfda-drug-reference.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-openfda-drug-reference/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_drug_ndc_directory":{"post":{"operationId":"search_drug_ndc_directory","summary":"Search the FDA National Drug Code directory of finished and unfinished drug products: NDC, brand and generic name, dosag","description":"Search the FDA National Drug Code directory of finished and unfinished drug products: NDC, brand and generic name, dosage form, route, marketing category, application number, pharmacologic class, DEA schedule, ingredients and packaging. Use for \"What is the NDC of Lipitor 10 mg tablets\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Search expression field:term, for example brand_name:\"Lipitor\". Combine with AND / OR (written with spaces), put quotes around phrases, and use ranges like decision_date:[20240101 TO 20241231] on date fields (YYYYMMDD).","title":"Search"},"sort":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Sort expression field:asc or field:desc, for example listing_expiration_date:desc.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":5,"description":"Records to return, 1 to 100.","title":"Limit"},"skip":{"anyOf":[{"maximum":25000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of matching records to skip, 0 to 25000; use with limit to page.","title":"Skip"}},"title":"search_drug_ndc_directoryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_drugsfda_applications":{"post":{"operationId":"search_drugsfda_applications","summary":"Search Drugs@FDA approval applications (NDA, ANDA, BLA): application number, sponsor, products with marketing status and","description":"Search Drugs@FDA approval applications (NDA, ANDA, BLA): application number, sponsor, products with marketing status and strengths, and submission history. Use for \"Which sponsor holds application NDA021436\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Search expression field:term, for example application_number:\"NDA021436\". Combine with AND / OR (written with spaces), put quotes around phrases, and use ranges like decision_date:[20240101 TO 20241231] on date fields (YYYYMMDD).","title":"Search"},"sort":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Sort expression field:asc or field:desc, for example application_number:asc.","title":"Sort"},"limit":{"anyOf":[{"maximum":25,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"Records to return, 1 to 25.","title":"Limit"},"skip":{"anyOf":[{"maximum":25000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of matching records to skip, 0 to 25000; use with limit to page.","title":"Skip"}},"title":"search_drugsfda_applicationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_ndc_spl_data_elements":{"post":{"operationId":"search_ndc_spl_data_elements","summary":"Search NDC SPL Data Elements (NSDE): package NDC (10 and 11 digit), proprietary name, dosage form, marketing category, a","description":"Search NDC SPL Data Elements (NSDE): package NDC (10 and 11 digit), proprietary name, dosage form, marketing category, application number, marketing dates and billing unit. Use for \"What is the billing unit of NDC 0002-3227\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Search expression field:term, for example package_ndc:\"0002-3227-30\". Combine with AND / OR (written with spaces), put quotes around phrases, and use ranges like decision_date:[20240101 TO 20241231] on date fields (YYYYMMDD).","title":"Search"},"sort":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Sort expression field:asc or field:desc.","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":5,"description":"Records to return, 1 to 100.","title":"Limit"},"skip":{"anyOf":[{"maximum":25000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of matching records to skip, 0 to 25000; use with limit to page.","title":"Skip"}},"title":"search_ndc_spl_data_elementsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_substance_records":{"post":{"operationId":"search_substance_records","summary":"Search openFDA substance records (a chemical, protein or other substance): UUID, UNII code, substance class, definition ","description":"Search openFDA substance records (a chemical, protein or other substance): UUID, UNII code, substance class, definition type and level, names, codes and relationships. Records can be long, so use a small limit. Use for \"Look up the substance with UNII R16CO5Y76E (aspirin)\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Search expression field:term, for example unii:R16CO5Y76E. Combine with AND / OR (written with spaces), put quotes around phrases, and use ranges like decision_date:[20240101 TO 20241231] on date fields (YYYYMMDD).","title":"Search"},"sort":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Sort expression field:asc or field:desc.","title":"Sort"},"limit":{"anyOf":[{"maximum":10,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Records to return, 1 to 10.","title":"Limit"},"skip":{"anyOf":[{"maximum":25000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of matching records to skip, 0 to 25000; use with limit to page.","title":"Skip"}},"title":"search_substance_recordsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/count_drug_reference_records":{"post":{"operationId":"count_drug_reference_records","summary":"Count how often each value of a field occurs among matching records of one drug reference dataset, for example NDC produ","description":"Count how often each value of a field occurs among matching records of one drug reference dataset, for example NDC products by dosage form. Returns term and count pairs. Use for \"How many NDC products exist per marketing category\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"category":{"description":"Endpoint group: drug (for ndc and drugsfda) or other (for nsde and substance).","enum":["drug","other"],"title":"Category","type":"string"},"dataset":{"description":"Dataset: ndc, drugsfda, nsde or substance (ndc and drugsfda belong to drug, nsde and substance to other).","enum":["ndc","drugsfda","nsde","substance"],"title":"Dataset","type":"string"},"count":{"description":"Field to count, for example marketing_category.exact or dosage_form.exact (the .exact suffix counts whole values).","maxLength":120,"title":"Count","type":"string"},"search":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Optional search expression restricting which records are counted, for example product_type:\"HUMAN PRESCRIPTION DRUG\".","title":"Search"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many distinct values to return, 1 to 1000 (most frequent first).","title":"Limit"}},"required":["category","dataset","count"],"title":"count_drug_reference_recordsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}