Overview
SAIMSARA stores machine-generated scoping reviews as reusable evidence objects.
Each object has a stable doc_key, title, issue, tags, source metadata, metrics, URL, and evidence text.
Base URL
https://saimsara.com/api/v1/
Access and limits
| User status | API access | Monthly quota | Rate limit |
|---|---|---|---|
| Free user | No | — | — |
| Active week pass | Yes | 750 requests/month | 60 requests/minute |
| Active Pro subscription | Yes | 3,000 requests/month | 60 requests/minute |
API keys with requires_subscription stop working automatically when the associated subscription or week pass expires.
Create your API key
- Log in to your SAIMSARA account.
- Open the account dropdown in SAIMSARA Chat.
- Find the Evidence API block.
- Click Create API key.
- Copy the key immediately. It is shown only once.
Key format
saim_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Authentication
Send your key in an HTTP header. The recommended header is X-SAIMSARA-Key.
X-SAIMSARA-Key: YOUR_API_KEY
You may also use a Bearer token:
Authorization: Bearer YOUR_API_KEY
?key=.... Browser history and server logs may expose it.
Search endpoint
Search evidence objects by query. This endpoint returns metadata only. It does not return the full evidence text.
| Parameter | Required | Description |
|---|---|---|
q or query |
Yes | Search query, 2–500 characters. |
issue or scope |
No | Issue slug, for example vascular. Multiple issues can be comma-separated. |
limit |
No | Number of results. Default 10, maximum configured limit 25. |
Windows CMD
curl.exe -i "https://saimsara.com/api/v1/search.php?q=FEVAR&issue=vascular&limit=5" -H "X-SAIMSARA-Key: YOUR_API_KEY"
Example response
{
"ok": true,
"api": {
"name": "SAIMSARA Evidence API",
"version": "v1"
},
"query": "FEVAR",
"issue_scope": ["vascular"],
"limit": 5,
"count": 1,
"results": [
{
"doc_key": "vascular::FEVAR_PM",
"issue_slug": "vascular",
"doc_id": "FEVAR_PM",
"title": "Fenestrated Endovascular Aortic Repair (FEVAR)",
"version": "2026-04-28",
"topic_tags": "Fenestrated endovascular aneurysm repair, Juxtarenal aortic aneurysm...",
"url": "https://saimsara.com/sessions/fevar-20260428-135919-6a4f34d7/",
"image_url": "",
"score": 418.8625793457031
}
]
}
Document endpoint
Retrieve one evidence object by doc_key. This endpoint can return the full evidence text.
| Parameter | Required | Description |
|---|---|---|
key or doc_key |
Yes | Document key in the format issue_slug::doc_id. |
include_text |
No | 1 returns full text. 0 returns metadata only. |
Metadata only
curl.exe -i "https://saimsara.com/api/v1/doc.php?key=vascular%3A%3AFEVAR_PM&include_text=0" -H "X-SAIMSARA-Key: YOUR_API_KEY"
Full evidence object
curl.exe -i "https://saimsara.com/api/v1/doc.php?key=vascular%3A%3AFEVAR_PM" -H "X-SAIMSARA-Key: YOUR_API_KEY"
Example response
{
"ok": true,
"api": {
"name": "SAIMSARA Evidence API",
"version": "v1"
},
"doc": {
"doc_key": "vascular::FEVAR_PM",
"issue_slug": "vascular",
"doc_id": "FEVAR_PM",
"title": "Fenestrated Endovascular Aortic Repair (FEVAR)",
"version": "2026-04-28",
"source_name": "PubMed",
"topic_tags": "Fenestrated endovascular aneurysm repair...",
"url": "https://saimsara.com/sessions/fevar-20260428-135919-6a4f34d7/",
"metrics": {
"included_all": 398,
"included_original": 357,
"reference_index": 209,
"total_participants": 240201
},
"text_length": 23712,
"text": "Results..."
}
}
Code examples
JavaScript / Node.js
const apiKey = process.env.SAIMSARA_API_KEY;
const url = "https://saimsara.com/api/v1/search.php?q=FEVAR&issue=vascular&limit=5";
const res = await fetch(url, {
headers: {
"X-SAIMSARA-Key": apiKey
}
});
const data = await res.json();
console.log(data);
Python
import os
import requests
api_key = os.environ["SAIMSARA_API_KEY"]
res = requests.get(
"https://saimsara.com/api/v1/search.php",
params={
"q": "FEVAR",
"issue": "vascular",
"limit": 5,
},
headers={
"X-SAIMSARA-Key": api_key,
},
timeout=20,
)
res.raise_for_status()
print(res.json())
PHP
<?php
$apiKey = getenv('SAIMSARA_API_KEY');
$url = 'https://saimsara.com/api/v1/search.php?' . http_build_query([
'q' => 'FEVAR',
'issue' => 'vascular',
'limit' => 5,
]);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-SAIMSARA-Key: ' . $apiKey,
'Accept: application/json',
],
CURLOPT_TIMEOUT => 20,
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code < 200 || $code >= 300) {
throw new RuntimeException('SAIMSARA API error: ' . $body);
}
$data = json_decode($body, true);
print_r($data);
Errors
| HTTP status | Error code | Meaning |
|---|---|---|
| 400 | missing_query, invalid_doc_key |
Missing or invalid request parameter. |
| 401 | missing_api_key, invalid_api_key |
No key was sent, or the key is invalid, inactive, expired, or revoked. |
| 402 | subscription_required, quota_exceeded |
Subscription/week pass is missing or monthly quota was reached. |
| 404 | not_found |
No evidence object found for the requested doc_key. |
| 429 | rate_limited |
Too many requests in the last 60 seconds. |
| 500 | server_error, search_failed, doc_failed |
Server-side error. |
Error response format
{
"ok": false,
"error": "subscription_required",
"message": "Active SAIMSARA Pro subscription or valid week pass is required for this API key."
}
Security and good practice
- Store your API key in environment variables, not inside public source code.
- Do not expose the key in frontend JavaScript.
- Do not send the key as a URL query parameter.
- Use HTTPS only.
- Rotate the key if it may have been exposed.
- The full key is shown only once. SAIMSARA stores only a SHA-256 hash of the key.