# Medex — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access data from medex.com.bd.

**Category:** Healthcare | **Website:** [medex.com.bd/](https://medex.com.bd/) | **Docs:** [parse.bot/marketplace/f544ac61-0cd8-4e85-ac84-43def00b37cc/medex-com-bd-api](https://parse.bot/marketplace/f544ac61-0cd8-4e85-ac84-43def00b37cc/medex-com-bd-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_brand_alternatives

All alternative brands containing the same generic compound as the specified brand. Navigates from the brand page to its generic's brand listing. Returns a complete list of alternatives with dosage form, strength, company, and pricing. Requires both brand_id and slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `brand_id` | string | Yes | Numeric brand identifier from search_medicines or list_brands results |
| `slug` | string | Yes | URL slug from search_medicines or list_brands results (e.g. 'napa-500-mg-tablet') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_brand_alternatives \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brand_id":"<string>","slug":"<string>"}'
```

### get_brand_detail

Full clinical and pricing detail for one brand medicine. Returns stable fields (name, dosage form, generic compound, manufacturer, strength, pricing) plus a sections dict containing variable clinical content (indications, pharmacology, dosage, side effects, interactions, etc.). Requires both brand_id and slug from a prior search or list call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `brand_id` | string | Yes | Numeric brand identifier from search_medicines or list_brands results |
| `slug` | string | Yes | URL slug from search_medicines or list_brands results (e.g. 'napa-500-mg-tablet') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_brand_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brand_id":"<string>","slug":"<string>"}'
```

### get_company_brands

First page of brand products manufactured by a specific pharmaceutical company. Returns brands with strength, generic compound, and pricing. Requires both company_id and slug from list_companies.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `company_id` | string | Yes | Numeric company identifier from list_companies results |
| `slug` | string | Yes | URL slug from list_companies results (e.g. 'aci-limited') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_company_brands \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company_id":"<string>","slug":"<string>"}'
```

### get_company_detail

Profile of a pharmaceutical company including overview text, logo, corporate details (established year, market share, headquarters, contact), and top brand products. Requires both company_id and slug from list_companies.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `company_id` | string | Yes | Numeric company identifier from list_companies results |
| `slug` | string | Yes | URL slug from list_companies results (e.g. 'aci-limited') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_company_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company_id":"<string>","slug":"<string>"}'
```

### get_generic_detail

Full clinical monograph for a generic medicine (active ingredient). Returns clinical sections (indications, pharmacology, dosage, side effects, interactions, etc.) and a preview of available brand formulations. Requires both generic_id and slug from list_generics.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `generic_id` | string | Yes | Numeric generic identifier from list_generics results |
| `slug` | string | Yes | URL slug from list_generics results (e.g. 'paracetamol') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_generic_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"generic_id":"<string>","slug":"<string>"}'
```

### get_low_price_alternatives

Find all alternative brands for a given brand name, sorted by price ascending (cheapest first). Searches for the brand, identifies its generic compound, then retrieves all brands of that compound sorted by unit price. A convenience endpoint for price comparison.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `brand_name` | string | Yes | Brand name to find alternatives for (e.g. 'Napa', 'Seclo') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_low_price_alternatives \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"brand_name":"<string>"}'
```

### get_medicine_price

Quick price lookup by medicine name. Searches for the medicine and returns pricing details (unit price, strip price, pack size) of the first matching brand. A convenience endpoint combining search + detail in one call.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Medicine name to search for (e.g. 'Napa', 'Seclo') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/get_medicine_price \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>"}'
```

### list_brands

Paginated alphabetical listing of brand-name medicines. Supports filtering by first letter and herbal-only flag. Each page returns ~30 brands with strength, generic compound, manufacturer, and pricing when available. Use page parameter to navigate through results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `herbal` | boolean | No | Set to true to filter herbal brands only |
| `letter` | string | No | Filter by first letter of brand name (single uppercase letter A-Z) |
| `page` | integer | No | Page number for pagination (1-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/list_brands \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"herbal":"<boolean>","letter":"<string>","page":"<integer>"}'
```

### list_companies

Paginated listing of pharmaceutical companies registered in Bangladesh. Each entry includes the number of generics and brand products the company manufactures.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/list_companies \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### list_generics

Paginated listing of generic medicine names (active pharmaceutical ingredients). Each entry includes the number of available brand formulations. Supports herbal-only filtering.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `herbal` | boolean | No | Set to true to filter herbal generics only |
| `page` | integer | No | Page number for pagination (1-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/list_generics \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"herbal":"<boolean>","page":"<integer>"}'
```

### search_medicines

Full-text search across brand and generic medicine names. Returns a flat list of matching brands with basic identification, generic compound, and manufacturer. No pagination — all matches returned in a single response. Useful as an entry point to discover brand IDs and slugs for detail endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword matching brand or generic medicine names |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-medex-com-bd-api-f544ac61/search_medicines \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
