Chemistry API
Overview
The Chemistry API provides access to a rich dataset of chemical properties associated with various drugs. With support for fuzzy and exact match searches, pagination, conditional detail inclusion, and sorting, this API offers flexibility and efficiency for applications ranging from pharmaceutical research to drug development.
Endpoint
GET https://www.britelink.io/api/v1/chemistry
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/chemistry" \
-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/chemistry";
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 |
Responses
- HTTP 200: Success, returns a list of chemistries.
- HTTP 404: No matching chemistries found.
- HTTP 500: Internal server error.
Response Format
Responses are structured as JSON, providing chemistries grouped by drugs, with pagination support through nextCursor
.
{
"chemistries": [
{
"drugName": "Denileukin diftitox",
"properties": [
{
"kind": "Molecular Formula",
"value": "C2560H4042N678O799S17"
},
{
"kind": "Melting Point",
"value": "71 °C (whole mAb)"
}
// Additional properties...
]
}
// Additional drugs with properties...
],
"nextCursor": "nextCursorString"
}
Use Cases
- Pharmaceutical Research: Access detailed chemical properties of drugs for research and development purposes.
- Drug Discovery: Utilize chemical data to identify potential drug candidates and assess their properties.
- Pharmacological Studies: Incorporate chemistry information into pharmacological studies for a better understanding of drug mechanisms and effects.
- Clinical Trials: Enhance clinical trial design by considering the chemical characteristics of drugs under investigation.
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 chemistries even with partial or similar drug names.
- Implement error handling to gracefully manage situations where no chemistries match the specified criteria.