Collections
List what you can search, and what each collection supports.
List collections
GET https://api.redpine.ai/api/v1/search/collectionsReturns all collections your API key has access to. The response includes each collection's name and description. Use the name field as the collection parameter when calling the Search API.
Authentication
Requires a valid API key via Authorization: Bearer header. The collections returned depend on what you have access to.
Response fields
| Field | Type | Description |
|---|---|---|
collections | array | Array of collection objects |
count | integer | Total number of collections returned |
Collection object
| Field | Type | Description |
|---|---|---|
name | string | Collection identifier; use this as the collection parameter in search requests |
description | string | null | Human-readable description of the collection's contents |
Example request (cURL)
curl "https://api.redpine.ai/api/v1/search/collections" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"Example request (Python)
import requests
response = requests.get(
"https://api.redpine.ai/api/v1/search/collections",
headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
)
data = response.json()
for collection in data["collections"]:
print(f"{collection['name']}: {collection.get('description') or 'No description'}")Example request (TypeScript)
const response = await fetch(
"https://api.redpine.ai/api/v1/search/collections",
{
headers: {
Authorization: "Bearer sk_live_YOUR_API_KEY",
},
}
);
const data = await response.json();
for (const collection of data.collections) {
console.log(collection.name, collection.description ?? "No description");
}Example response
{
"collections": [
{
"name": "pubmed-2024",
"description": "PubMed research articles from 2024 covering biomedical literature"
},
{
"name": "arxiv-cs",
"description": "Computer science papers from arXiv"
},
{
"name": "clinical-trials",
"description": null
}
],
"count": 3
}Usage notes
Call this endpoint to discover which collections are available before making search requests. The name field is what you pass as collection in the POST /api/v1/search/query endpoint.
Was this page helpful?