API Reference

Pricing & Network API

Read-only endpoints for retrieving Direct-to-Consumer (CPD) and Team Cuban Card (TCC) price lists and searching by NDC or term, optionally localized by address for nearby pharmacies.

Overview

The Cost Plus Drugs Pricing and Network API provides programmatic access to our current drug price lists across three distribution channels. All endpoints are read-only and return JSON.

Use this API to:

  • Retrieve the full price list for any channel
  • Search by NDC (with or without generic substitutions), GPI, or drug name
  • Locate nearby TCC or CPDAPN pharmacies given a patient address
  • Fetch a single entry by external_sku

Server & Authentication

Base URL https://api.costplusdrugs.com
Protocol HTTPS only
Authentication None required
Response format application/json

Channels

Each drug listing may include pricing for one or more distribution channels. Use the dedicated channel endpoints for focused access, or /pricelist/all to retrieve everything at once.

Exclude Fields

All endpoints accept the query parameter exclude_fields, allowing callers to omit fields they don't need and reduce response size.

Pass a comma-separated list of field names. To exclude a nested field, use dot notation:

examples
# Exclude the entire equivalent_ndcs array
exclude_fields=equivalent_ndcs

# Exclude a nested field inside cpd_channel
exclude_fields=cpd_channel.cash_dispensing_fee

# Exclude multiple fields
exclude_fields=equivalent_ndcs,tcc_channel,special_handling

Treatment Category Filter

All list and search endpoints (/pricelist/all, /pricelist/cpd, /pricelist/tcc, /pricelist/cpdapn, their /search variants, /pricelist/search, and /pricelist/cpd/simplified) accept the query parameter treatment_category, allowing callers to restrict results to one or more indications/categories.

Pass a comma-separated list of category names to match with OR logic. Matching is case-insensitive and matches against the treatment_categories array on each entry. Valid category names are listed by /pricelist/treatment-categories.

examples
# Only entries categorized as High Cholesterol (URL-encode spaces)
treatment_category=High%20Cholesterol

# Entries categorized as either High Cholesterol or Diabetes
treatment_category=High%20Cholesterol,Diabetes
ℹ️ Entries with no treatment_categories data are excluded whenever treatment_category is provided.

GET /pricelist/all

Returns the complete price list with CPD and TCC channels populated where available. Note: CPDAPN pricing is not included in this endpoint — use /pricelist/cpdapn or /pricelist/search for funded-network pricing.

GET /pricelist/all
200 OK — PriceListEntry[] (cpd_channel + tcc_channel)

Supports exclude_fields and treatment_category. See Exclude Fields and Treatment Category Filter.

cURL
curl -s https://api.costplusdrugs.com/pricelist/all
cURL — Filter by treatment category
curl -s "https://api.costplusdrugs.com/pricelist/all?treatment_category=Diabetes"

Schema: PriceListEntry

Base object returned by all list and search endpoints. Channel-specific pricing is nested under cpd_channel, tcc_channel, or cpdapn_channel. A field is null or omitted when the item is not available in that channel.

Field Type Required Description
external_sku string Yes Stable external SKU identifier.
medication_name string Yes Medication display name (generic or brand).
brand_generic "Generic" | "Branded" Yes Drug classification.
form string Yes Dosage form (e.g., Tablet).
strength string Yes Strength (e.g., 10mg).
brand_name string Yes For generics, the brand this maps to; for brands, itself.
pack_size number Yes Numeric NDC pack size. If splittable=false, dispensing is in multiples of this.
quantity number Yes Number of packs.
unit string Yes Unit of measure (e.g., tablets, mL).
splittable boolean Yes true if a pharmacy can dispense less than the full pack_size; false if only multiples of pack_size are available.
equivalent_ndcs string[] Yes All NDCs for which a generic equivalent can be provided.
rxnorm_id string | null No RxNorm RXCUI for the NDC, as mapped by the NLM RxNorm API. null if no active RxNorm mapping has been found for this NDC.
url string | null Conditional URL for the product listing at costplusdrugs.com. Present for CPD entries; null for TCC-only entries. Omitted entirely when the response excludes cpd_channel.
special_handling string | null No Special handling designation. Value is "cold-chain" when applicable; null otherwise.
sample_pack_size number No Default 30 for pills.
sample_volume string No Human-readable sample size (e.g., 30 count).
treatment_categories string[] No Readable indications and categories for the medication.
cpd_channel object | null No CPD pricing and availability. See CPD channel schema.
tcc_channel object | null No TCC pricing, fees, and pharmacies. See TCC channel schema.
cpdapn_channel object | null No CPDAPN (funded) pricing. See CPDAPN channel schema.

Schema: SamplePricing

Pricing calculated for multiple dispense quantities. Always three entries: 1×, 2×, and 3× the default sample pack size (typically 30, 60, 90 for splittable pills; 1, 2, 3 units for non-splittable). All price fields are returned as decimal strings (e.g., "2.10").

FieldTypeDescription
sample_pack_size string e.g., "30 count", "60 count", "1 Tablet".
sample_pack_price string sample_pack_size × price_per_unit, formatted to 2 decimal places.
sample_pack_price_total_to_patient_without_shipping string sample_pack_price + dispensing_fee, formatted to 2 decimal places.

Additional Endpoints

Beyond the primary list and search endpoints, the API exposes several focused endpoints.

Channel-scoped search

Each channel has a dedicated search endpoint that returns results filtered to that channel only:

cURL
GET /pricelist/cpd/search?ndc=67877-0511-10
GET /pricelist/tcc/search?term=atorvastatin
GET /pricelist/cpdapn/search?ndc=67877-0511-10

Accept the same query parameters as /pricelist/search (ndc, term, gpi, strength, no_substitutions, address, distance, treatment_category, exclude_fields). The TCC and CPDAPN scoped search endpoints also support the address parameter for pharmacy lookup.

GET /pricelist/treatment-categories

Returns the distinct list of treatment_categories values present across the price list, sorted alphabetically. Use this to discover valid values for the treatment_category filter.

cURL
curl -s https://api.costplusdrugs.com/pricelist/treatment-categories
JSON
["Acid Reflux", "Alcohol Dependence", "Allergies", ...]

Fetch by external_sku

Fetch a single entry by its stable external_sku using /pricelist/search. The response is a single object rather than an array.

cURL
curl -s "https://api.costplusdrugs.com/pricelist/search?external_sku=d0b9ba0ae3ab9143200cfbce6ecb7a6a"

GET /pharmacies/tcc

Returns TCC (unfunded) network pharmacies. Without an address, returns the full network. With an address (ZIP code or street address), returns the nearest 20 within distance miles (default 30, max 100), sorted by ascending distance. See the Pharmacy schema.

cURL
curl -sG https://api.costplusdrugs.com/pharmacies/tcc \
  --data-urlencode "address=233 S Wacker Dr, Chicago, IL 60606" \
  -d distance=10

GET /pharmacies/cpdapn

Returns CPDAPN (funded) network pharmacies. Same parameters and behavior as /pharmacies/tcc. The funded network includes chains that are not part of TCC, such as Walgreens.

cURL
curl -s "https://api.costplusdrugs.com/pharmacies/cpdapn?address=60606&distance=25"

GET /pricelist/cpd/simplified

Returns a marketing-friendly flat list of CPD entries. Each item includes a human-readable price string rather than raw fee components. Returns three entries per drug (30-count, 60-count, 90-count or equivalent). equivalent_ndcs is shortened in the sample below. Supports treatment_category; see Treatment Category Filter.

cURL
curl -s https://api.costplusdrugs.com/pricelist/cpd/simplified

Sample item:

JSON
{
  "medication_name": "Atorvastatin",
  "brand_generic": "Generic",
  "brand_name": "Lipitor",
  "strength": "10mg",
  "form": "Tablet",
  "price": "30 count of Atorvastatin 10mg costs $5.25. This does not include shipping.",
  "in_stock": true,
  "special_handling": "",
  "url": "https://www.costplusdrugs.com/medications/atorvastatin-10mg-tablet/?utm_source=api&utm_content=pricing-api",
  "equivalent_ndcs": ["67877-0511-10", "00904-6290-61", "68084-0097-01"],
  "treatment_categories": ["Heart Health", "High Cholesterol"]
}

Business Rules

  • Provide at least one of ndc or term for /pricelist/search.
  • no_substitutions=true requires ndc and enforces exact-NDC matching.
  • If address is provided, tcc_channel.pharmacies and cpdapn_channel.pharmacies are populated with the nearest 20 network pharmacies (default 30-mile radius, max 100 miles), sorted ascending by distance.
  • Each channel only returns pharmacies in its own network. Chains that participate only in the funded network (e.g., Walgreens) appear in CPDAPN results and never in TCC.
  • If a drug is excluded for a pharmacy chain, that chain will not appear in pharmacy results for that drug.
  • /pricelist/all returns CPD + TCC only. CPDAPN is available via /pricelist/cpdapn or /pricelist/search.
  • CPD: sample_pack_price_w_shipping_dispensing = sample_pack_price + shipping_cost + dispensing_fee
  • TCC: sample_pack_price_w_dispensing = sample_pack_price + pharmacy_dispensing_fee + admin_fee
  • CPDAPN: sample_pack_price_w_dispensing = sample_pack_price + pharmacy_dispensing_fee (no admin fee)
  • Some pharmacy chains have chain-specific dispensing fees. Always use pharmacies[].sample_pack_price_w_dispensing for patient-facing totals.