API Documentation
Base URL
https://substancesearch.org/api
Endpoints
Get Substance Data
GET
/substance/{slug}
Returns substance data from all available sources.
Path Parameters
Parameter | Type | Description |
---|---|---|
slug | string | The URL-friendly slug of the substance (e.g., "lsd", "mdma", "ketamine") |
Response
Returns a JSON object containing substance data from all available sources.
Example Request
curl -X GET https://substancesearch.org/api/substance/lsd
Example Response
{
"tripsit": {
"name": "LSD",
"categories": ["psychedelic"],
"dose_units": "µg",
"...": "..."
},
"psychonautwiki": {
"name": "LSD",
"class": "Psychedelic",
"...": "..."
}
}
Status Codes
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid slug format |
404 | Not Found - Substance not found |
Get Substance Data from Specific Source
GET
/substance/{slug}/sources/{source}
Returns substance data from a specific source.
Path Parameters
Parameter | Type | Description |
---|---|---|
slug | string | The URL-friendly slug of the substance (e.g., "lsd", "mdma", "ketamine") |
source | string | The data source to retrieve information from. Available sources: tripsit, psychonautwiki |
Response
Returns a JSON object containing substance data from the specified source.
Example Request
curl -X GET https://substancesearch.org/api/substance/lsd/sources/tripsit
Example Response
{
"name": "LSD",
"categories": ["psychedelic"],
"dose_units": "µg",
"...": "..."
}
Status Codes
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid slug format or invalid source |
404 | Not Found - Substance not found or data not available for the specified source |