/openfda/drug/labels
curl --request POST \
--url https://api.anysite.io/api/openfda/drug/labels \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"id": "<string>",
"timeout": 300
}
'import requests
url = "https://api.anysite.io/api/openfda/drug/labels"
payload = {
"id": "<string>",
"timeout": 300
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '<string>', timeout: 300})
};
fetch('https://api.anysite.io/api/openfda/drug/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/openfda/drug/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'timeout' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/openfda/drug/labels"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"timeout\": 300\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/openfda/drug/labels")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"timeout\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/openfda/drug/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"timeout\": 300\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "OpenfdaDrugLabel",
"set_id": "<string>",
"version": "<string>",
"effective_at": 123,
"indications_and_usage": [],
"boxed_warning": [],
"warnings": [],
"warnings_and_cautions": [],
"dosage_and_administration": [],
"contraindications": [],
"adverse_reactions": [],
"drug_interactions": [],
"active_ingredient": [],
"inactive_ingredient": [],
"purpose": [],
"clinical_pharmacology": [],
"mechanism_of_action": [],
"precautions": [],
"general_precautions": [],
"overdosage": [],
"do_not_use": [],
"ask_doctor": [],
"when_using": [],
"stop_use": [],
"pregnancy": [],
"pregnancy_or_breast_feeding": [],
"nursing_mothers": [],
"pediatric_use": [],
"geriatric_use": [],
"information_for_patients": [],
"clinical_studies": [],
"how_supplied": [],
"keep_out_of_reach_of_children": [],
"storage_and_handling": [],
"questions": [],
"spl_product_data_elements": [],
"package_label_principal_display_panel": [],
"openfda": {
"@type": "OpenfdaBlock",
"application_number": [],
"brand_name": [],
"generic_name": [],
"manufacturer_name": [],
"product_ndc": [],
"package_ndc": [],
"product_type": [],
"route": [],
"substance_name": [],
"rxcui": [],
"unii": [],
"spl_id": [],
"spl_set_id": [],
"nui": [],
"pharm_class_cs": [],
"pharm_class_epc": [],
"pharm_class_moa": [],
"pharm_class_pe": [],
"is_original_packager": [],
"device_class": "<string>",
"device_name": "<string>",
"medical_specialty_description": "<string>",
"regulation_number": "<string>",
"fei_number": [],
"registration_number": [],
"k_number": [],
"pma_number": []
},
"web_url": ""
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/openfda/drug
/openfda/drug/labels
Get an FDA drug product label (SPL) by its SPL document id or SPL set id
Price: 1 credit
⚠️ Common errors: 412: Drug label not found
POST
/
api
/
openfda
/
drug
/
labels
/openfda/drug/labels
curl --request POST \
--url https://api.anysite.io/api/openfda/drug/labels \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"id": "<string>",
"timeout": 300
}
'import requests
url = "https://api.anysite.io/api/openfda/drug/labels"
payload = {
"id": "<string>",
"timeout": 300
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '<string>', timeout: 300})
};
fetch('https://api.anysite.io/api/openfda/drug/labels', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anysite.io/api/openfda/drug/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'timeout' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/openfda/drug/labels"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"timeout\": 300\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/openfda/drug/labels")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"timeout\": 300\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/openfda/drug/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"timeout\": 300\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"@type": "OpenfdaDrugLabel",
"set_id": "<string>",
"version": "<string>",
"effective_at": 123,
"indications_and_usage": [],
"boxed_warning": [],
"warnings": [],
"warnings_and_cautions": [],
"dosage_and_administration": [],
"contraindications": [],
"adverse_reactions": [],
"drug_interactions": [],
"active_ingredient": [],
"inactive_ingredient": [],
"purpose": [],
"clinical_pharmacology": [],
"mechanism_of_action": [],
"precautions": [],
"general_precautions": [],
"overdosage": [],
"do_not_use": [],
"ask_doctor": [],
"when_using": [],
"stop_use": [],
"pregnancy": [],
"pregnancy_or_breast_feeding": [],
"nursing_mothers": [],
"pediatric_use": [],
"geriatric_use": [],
"information_for_patients": [],
"clinical_studies": [],
"how_supplied": [],
"keep_out_of_reach_of_children": [],
"storage_and_handling": [],
"questions": [],
"spl_product_data_elements": [],
"package_label_principal_display_panel": [],
"openfda": {
"@type": "OpenfdaBlock",
"application_number": [],
"brand_name": [],
"generic_name": [],
"manufacturer_name": [],
"product_ndc": [],
"package_ndc": [],
"product_type": [],
"route": [],
"substance_name": [],
"rxcui": [],
"unii": [],
"spl_id": [],
"spl_set_id": [],
"nui": [],
"pharm_class_cs": [],
"pharm_class_epc": [],
"pharm_class_moa": [],
"pharm_class_pe": [],
"is_original_packager": [],
"device_class": "<string>",
"device_name": "<string>",
"medical_specialty_description": "<string>",
"regulation_number": "<string>",
"fei_number": [],
"registration_number": [],
"k_number": [],
"pma_number": []
},
"web_url": ""
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
⌘I