Classification of Drugs
Overview
The Classification API provides access to a comprehensive dataset of chemical classifications associated with various drugs. This API supports fuzzy and exact match searches, pagination, conditional detail inclusion, and sorting, offering flexibility and efficiency for applications in pharmaceutical research, drug development, and related fields.
Endpoint
GET https://www.britelink.io/api/v1/classifications
Authorization Header
To access the API, include an authorization header with your request:
Header | Value |
---|---|
Authorization | Bearer YOUR_API_KEY |
Replace YOUR_API_KEY
with the API key you receive upon registration or from your API management dashboard.
Making a Request
Example Request using cURL
curl -X GET "https://www.britelink.io/api/v1/classifications" \
-H "Authorization: Bearer YOUR_API_KEY"
Example Request using JavaScript
const apiKey = "YOUR_API_KEY"; // Replace with your API key
const apiUrl = "https:///www.britelink.io/api/v1/classifications";
fetch(apiUrl, {
method: "GET",
headers: {
Authorization: `Bearer ${apiKey}`,
},
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
Request Parameters
Customize your query with the following parameters:
Parameter | Type | Description | Required |
---|---|---|---|
cursor | string | Cursor for pagination, indicating the starting point for the next batch of results. | No |
b | integer | Batch size for pagination, up to a maximum of 250. Default is 25. | No |
n | string | The name of the drug to search for, supporting fuzzy and exact matches. | No |
r | boolean | Specify if related fields should be included (default: false). | No |
k | string | Filter classifications by kingdom. | No |
s | string | Filter classifications by superclass. | No |
c | string | Filter classifications by class. | No |
sc | string | Filter classifications by subclass. | No |
Responses
- HTTP 200: Success, returns a list of classifications.
- HTTP 404: No matching classifications found.
- HTTP 500: Internal server error.
Response Format
Responses are structured as JSON, providing an array of classifications grouped by drugs, with pagination support through nextCursor
.
{
"classifications": [
{
"id": "clsr6c07e17p7xej5zvuztsx6",
"description": "This compound belongs to the class of organic compounds known as dimethoxybenzenes. These are organic aromatic compounds containing a monocyclic benzene moiety carrying exactly two methoxy groups.",
"directParent": "Dimethoxybenzenes",
"kingdom": "Organic compounds",
"superclass": "Benzenoids",
"class": "Benzene and substituted derivatives",
"subclass": "Methoxybenzenes",
"drugs": [
{
"id": "clslvydmx00d313zpjs4l48k4",
"tradeName": "Methoxamine",
"genericName": "Methoxamine"
}
]
}
],
"nextCursor": "nextCursorString"
}
Use Cases
Pharmaceutical Research: Access detailed chemical classifications of drugs for research and development.
- Drug Discovery: Utilize chemical classification data to identify potential drug candidates and assess their properties.
- Pharmacological Studies: Incorporate chemical classification information into pharmacological studies for a better understanding of drug mechanisms.
- Clinical Trials: Enhance clinical trial design by considering the chemical classifications of drugs under investigation.
- Toxicity Assessment: Assess the toxicity of drugs based on their chemical classifications to mitigate potential adverse effects.
Best Practices
- Use pagination to handle large datasets efficiently, ensuring optimal performance and resource utilization.
- Leverage fuzzy search for flexible querying, allowing users to find classifications even with partial or similar drug names.
- Implement error handling to gracefully manage situations where no classifications match the specified criteria.