Search substances
curl --request GET \
--url https://www.closient.com/substances/api/v1/substances \
--header 'X-API-Key: <api-key>'import requests
url = "https://www.closient.com/substances/api/v1/substances"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://www.closient.com/substances/api/v1/substances', 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://www.closient.com/substances/api/v1/substances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/substances/api/v1/substances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.closient.com/substances/api/v1/substances")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/substances/api/v1/substances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 123,
"limit": 123,
"offset": 123,
"items": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"substance_type": "<string>",
"cas_number": "<string>",
"ec_number": "<string>",
"inci_name": "<string>",
"is_hazardous": true,
"hazard_class": "<string>",
"is_major_allergen": true,
"allergen_type": "<string>",
"limit_value": "<string>",
"limit_unit": "<string>",
"regulation_reference": "<string>",
"metadata": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}Substances
Search substances
Search the substance reference catalog by name, type, allergen, or hazard. Results are paginated via limit/offset and ordered by name.
GET
/
substances
/
api
/
v1
/
substances
Search substances
curl --request GET \
--url https://www.closient.com/substances/api/v1/substances \
--header 'X-API-Key: <api-key>'import requests
url = "https://www.closient.com/substances/api/v1/substances"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://www.closient.com/substances/api/v1/substances', 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://www.closient.com/substances/api/v1/substances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/substances/api/v1/substances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.closient.com/substances/api/v1/substances")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/substances/api/v1/substances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total": 123,
"limit": 123,
"offset": 123,
"items": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"substance_type": "<string>",
"cas_number": "<string>",
"ec_number": "<string>",
"inci_name": "<string>",
"is_hazardous": true,
"hazard_class": "<string>",
"is_major_allergen": true,
"allergen_type": "<string>",
"limit_value": "<string>",
"limit_unit": "<string>",
"regulation_reference": "<string>",
"metadata": {}
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error_code": "<string>",
"retryable": true,
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
APIKeyHeaderAuthOAuthTokenAuthCookieGatedSessionAuth
Query Parameters
Case-insensitive substring match on substance name.
Filter by substance type (e.g. FOOD_INGREDIENT, MATERIAL, CHEMICAL).
Filter by allergen type (e.g. PEANUTS, TREE_NUTS, DAIRY).
Filter to only (or only non-) major allergens.
Filter by hazard classification (e.g. CARCINOGEN, IRRITANT).
Maximum number of results to return.
Number of results to skip, for pagination.
Response
OK
Paginated list response.
Total number of substances matching the query, across all pages.
The limit that was applied to this page of results.
The offset that was applied to this page of results.
Substances on this page of results.
Show child attributes
Show child attributes
⌘I