Find an API

Search public APIs with auth details & Postman guides

← All APIs

openFDA API

api.fda.gov · Health

Health API Key Free & Open Healthcare FDA Drugs

US FDA public data — drug adverse events, drug labels, device recalls, food enforcement reports, and tobacco product listings. Free, no API key required for basic use (1,000 requests/day without key).

Authentication

API Key No key required for 1,000 requests/day. Free API key at open.fda.gov/apis/authentication/ for 120,000 requests/day.

Sample Requests

GET Search drug adverse events

Find FDA drug adverse event reports mentioning headache.

https://api.fda.gov/drug/event.json?limit=5&search=patient.reaction.reactionmeddrapt:headache

Hover any highlighted part to learn what it does

curl -X GET "https://api.fda.gov/drug/event.json?limit=5&search=patient.reaction.reactionmeddrapt%3Aheadache"
import requests
params = {
    "limit": "5",
    "search": "patient.reaction.reactionmeddrapt:headache"
}
response = requests.get(
    "https://api.fda.gov/drug/event.json",
    params=params,
)
print(response.json())
const url = new URL('https://api.fda.gov/drug/event.json');
url.searchParams.set('limit', '5');
url.searchParams.set('search', 'patient.reaction.reactionmeddrapt:headache');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.fda.gov/drug/event.json")
	q := baseURL.Query()
	q.Set("limit", "5")
	q.Set("search", "patient.reaction.reactionmeddrapt:headache")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.fda.gov/drug/event.json")
uri.query = URI.encode_www_form({
  "limit" => "5",
  "search" => "patient.reaction.reactionmeddrapt:headache"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.fda.gov/drug/event.json?" . http_build_query([
    "limit" => "5",
    "search" => "patient.reaction.reactionmeddrapt:headache"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Drug label lookup

Look up the FDA label for aspirin.

https://api.fda.gov/drug/label.json?limit=1&search=openfda.brand_name:aspirin

Hover any highlighted part to learn what it does

curl -X GET "https://api.fda.gov/drug/label.json?limit=1&search=openfda.brand_name%3Aaspirin"
import requests
params = {
    "limit": "1",
    "search": "openfda.brand_name:aspirin"
}
response = requests.get(
    "https://api.fda.gov/drug/label.json",
    params=params,
)
print(response.json())
const url = new URL('https://api.fda.gov/drug/label.json');
url.searchParams.set('limit', '1');
url.searchParams.set('search', 'openfda.brand_name:aspirin');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.fda.gov/drug/label.json")
	q := baseURL.Query()
	q.Set("limit", "1")
	q.Set("search", "openfda.brand_name:aspirin")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.fda.gov/drug/label.json")
uri.query = URI.encode_www_form({
  "limit" => "1",
  "search" => "openfda.brand_name:aspirin"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.fda.gov/drug/label.json?" . http_build_query([
    "limit" => "1",
    "search" => "openfda.brand_name:aspirin"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed for 1,000 req/day
  2. Try GET https://api.fda.gov/drug/event.json?search=patient.reaction.reactionmeddrapt:nausea&limit=5
  3. Drug recalls: GET /drug/enforcement.json?search=status:Ongoing&limit=5
  4. Device recalls: GET /device/recall.json?limit=5
  5. Get a free key at open.fda.gov for 120K req/day

Open documentation ↗