Skip to main content
Use this endpoint to retrieve a paginated list of medications from your catalog. Filter by status to find active or inactive entries, and use cursor to navigate through pages of results.

Request

GET https://api.clinikapi.com/v1/medications

Headers

x-api-key
string
required
Your ClinikAPI secret key (clk_live_* or clk_test_*).

Query parameters

status
string
Filter by medication status. One of: active, inactive.
count
number
Number of results to return per page. Maximum: 100. Defaults to 20.
cursor
string
Opaque pagination cursor returned in the previous response. Omit to start from the beginning.

Response

Returns 200 OK with a paginated list of medication resources.
data
array
Array of medication objects matching the query filters.
data[].id
string
Medication ID.
data[].code
string | object
Drug code — free-text string or coded object.
data[].status
string
Medication status: active or inactive.
data[].form
string
Dosage form, if recorded.
meta
object
Standard response metadata including requestId, timestamp, status, and rate-limit fields.
meta.nextCursor
string
Cursor to pass as cursor in the next request to fetch the following page. Absent when there are no more results.

Examples

curl

curl "https://api.clinikapi.com/v1/medications?status=active&count=50" \
  -H "x-api-key: clk_live_abc123"

TypeScript SDK

import { Clinik } from '@clinikapi/sdk';

const clinik = new Clinik(process.env.CLINIKAPI_SECRET_KEY!);

const { data, meta } = await clinik.medications.search({
  status: 'active',
  count: 50,
});

console.log(data.length);       // up to 50
console.log(meta.nextCursor);   // use to fetch the next page