Research API
Access the Blossom psychedelic research database programmatically. Papers, clinical trials, compounds, researchers, and co-authorship networks — available as JSON, CSV, and downloadable datasets for R, Python, and SPSS.
Quick Start
1. Authenticate
All API requests require a Clerk JWT. Sign in to Blossom, then use your session token in the Authorization header.
2. Make a request
curl -H "Authorization: Bearer YOUR_JWT" \
"https://blossom.pub/api/v1/papers?limit=10&compound=psilocybin"3. Get CSV for R/SPSS
curl -H "Authorization: Bearer YOUR_JWT" \
"https://blossom.pub/api/v1/papers?format=csv&compound=psilocybin" \
-o papers.csvEndpoints
| Method | Path | Description | Tier |
|---|---|---|---|
| GET | /api/v1/papers | List papers with metadata (paginated, filterable) | free |
| GET | /api/v1/papers/:slug | Single paper detail — Pro adds outcome measures & adverse events | free |
| GET | /api/v1/trials | List clinical trials (paginated, filterable) | free |
| GET | /api/v1/trials/:slug | Single trial detail — Pro adds arms, dosing, eligibility | free |
| GET | /api/v1/compounds | List compounds with trial/paper counts | free |
| GET | /api/v1/topics | List topics/indications with trial/paper counts | free |
| GET | /api/v1/persons | List researchers with affiliations | free |
| GET | /api/v1/journals | List journals with h-index | free |
| GET | /api/v1/network | Co-authorship network graph (nodes + edges) | pro |
| GET | /api/v1/evidence-matrix | Compound × topic evidence matrix | pro |
| GET | /api/v1/downloads | List available dataset files for download | free |
Query Parameters
All list endpoints support these query parameters:
| Parameter | Description |
|---|---|
| limit | Results per page (1–100, default 25) |
| cursor | Pagination cursor (use value from response meta.cursor) |
| compound | Filter by compound slug (e.g., psilocybin) |
| topic | Filter by topic slug (e.g., depression) |
| since | Filter by date (ISO 8601, e.g., 2024-01-01) |
| format | Response format: json (default) or csv |
Response Format
JSON responses follow a consistent envelope:
{
"data": [ ... ],
"meta": {
"cursor": "abc123",
"hasMore": true
}
}Code Examples
Python
import requests
headers = {"Authorization": "Bearer YOUR_JWT"}
resp = requests.get(
"https://blossom.pub/api/v1/papers",
params={"compound": "psilocybin", "limit": 50},
headers=headers,
)
papers = resp.json()["data"]R (httr2)
library(httr2)
resp <- request("https://blossom.pub/api/v1/papers") |>
req_headers(Authorization = paste("Bearer", Sys.getenv("BLOSSOM_JWT"))) |>
req_url_query(compound = "psilocybin", format = "csv") |>
req_perform()
papers <- read.csv(textConnection(resp_body_string(resp)))R (download CSV)
# Download a pre-generated dataset (daily updated)
papers <- read.csv("https://blossom.pub/api/v1/downloads/papers-metadata.csv",
na.strings = "NA", fileEncoding = "UTF-8-BOM")Downloadable Datasets
Pre-generated datasets are refreshed daily. Available in CSV (R/SPSS compatible) and JSON formats. Use the /api/v1/downloads endpoint to list all available files with download URLs.
| File | Description | Tier |
|---|---|---|
| papers-metadata.csv | All papers: DOI, PMID, title, date, study type, authors, compounds, topics | free |
| papers-outcomes.csv | Per-arm outcome measures: timepoints, estimates, CIs | pro |
| papers-contrasts.csv | Between-group contrasts: effect sizes, p-values | pro |
| papers-adverse-events.csv | Per-arm TEAE counts | pro |
| trials.csv | All trials: registry, phase, status, compound, sponsor | free |
| trials-detailed.csv | Trials with eligibility, therapy, sites | pro |
| persons.csv | Researchers with affiliations and paper/trial counts | free |
| compounds.csv | Compounds with pharmacology and counts | free |
| topics.csv | Indications with prevalence and counts | free |
| evidence-matrix.csv | Compound x topic evidence ratings | pro |
| network.json | Co-authorship network graph | pro |
Rate Limits
Free
100
requests / minute
Pro
500
requests / minute
CSV Conventions
All CSV files follow these conventions for compatibility with R, SPSS, JASP, and Excel:
- UTF-8 with BOM (Windows Excel compatible)
- Comma-delimited
NAfor missing values (R convention)- ISO 8601 dates (YYYY-MM-DD)
- Multi-value fields joined with semicolons (e.g., "compound1; compound2")
- snake_case column names