Chemical Structures

Overview

The Chemical Structure API provides access to chemical structures associated with drugs. It supports searching for chemical structures by drug name, fetching a list of chemical structures, and retrieving detailed information about each chemical structure.

Endpoint

GET https://www.britelink.io/api/v1/structures

Authorization Header

To access the API, include an authorization header with your request:

HeaderValue
AuthorizationBearer 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/structures" \
     -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/structures";

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:

ParameterTypeDescriptionRequired
nstringThe drug name to search for chemical structures. Supports fuzzy search.No
bintegerBatch size for pagination, up to a maximum of 500. Default is 250.No
cursorstringCursor for pagination, indicating the starting point for the next batch of results.No

Responses

  • HTTP 200: Success, returns a list of chemical structures.
  • HTTP 404: No matching chemical structures found.
  • HTTP 500: Internal server error.

Response Format

Responses are structured as JSON, providing a list of chemical structures grouped by drug name.

{
  "chemicalStructures": [
    {
      "drugName": "Acarbose",
      "drugId": "clrn36iud0012jr08bn6mg4ho",
      "structures": [
        {
          "id": "clsn4rx2d00f7p8eza7xgkwxa",
          "name": "(2R,3R,4R,5R)-4-{[(2R,3R,4R,5S,6R)-5-{[(2R,3R,4S,5S,6R)-3,4-dihydroxy-6-methyl-5-{[(1S,4R,5S,6S)-4,5,6-trihydroxy-3-(hydroxymethyl)cyclohex-2-en-1-yl]amino}oxan-2-yl]oxy}-3,4-dihydroxy-6-(hydroxymethyl)oxan-2-yl]oxy}-2,3,5,6-tetrahydroxyhexanal",
          "formula": "C25H43NO18",
          "molecularWeight": 645.608,
          "casNumber": "56180-94-0"
        }
      ]
    },
    {
      "drugName": "Acarbose",
      "drugId": "clslvmdto003m13zpoq5en5n4",
      "structures": []
    }
  ]
}

Use Cases

  • Pharmaceutical Research: Access detailed chemical structure information for drug development and analysis.
  • Chemistry Education: Provide students and researchers with comprehensive chemical structure data for educational purposes.
  • Drug Discovery: Utilize chemical structure data to identify potential drug candidates and study their properties.

Best Practices

  • Use the n parameter for efficient searching of chemical structures by drug name, supporting fuzzy search for better results.
  • Employ pagination with the b and cursor parameters for handling large datasets and optimizing performance.
  • Ensure proper authentication by including the authorization header with your API key in each request.