# Al Dawaa — 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.

> Search for medications across Al-Dawaa Pharmacy locations in Saudi Arabia and instantly check their stock status, pricing, and detailed product information. Get real-time availability data to find the exact medications you need and compare prices before visiting or ordering.

**Category:** Healthcare | **Website:** [www.al-dawaa.com/en/p/102020/selecta-5-mg-antihypertensive-30-tablets](https://www.al-dawaa.com/en/p/102020/selecta-5-mg-antihypertensive-30-tablets) | **Docs:** [parse.bot/marketplace/e2f4633e-25a5-44dd-911a-16ff17c32b88/al-dawaa-com-api](https://parse.bot/marketplace/e2f4633e-25a5-44dd-911a-16ff17c32b88/al-dawaa-com-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-al-dawaa-com-api-e2f4633e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_medication_details

Get detailed information about a specific medication by its product code (from search_medication results). Returns stock level, price, categories, prescription requirement, and pickup/delivery availability.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_code` | string | Yes | Product code from search_medication results (e.g. '102020'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-al-dawaa-com-api-e2f4633e/get_medication_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_code":"<string>"}'
```

### search_medication

Search for medications by name or keyword. Returns a paginated list of matching products with their availability status, price, and whether a prescription is required. Pagination is 0-indexed; omitting page returns the first page.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | 0-indexed page number for pagination. |
| `page_size` | integer | No | Number of results per page (1-100). |
| `query` | string | Yes | Search term for medication name, brand, or keyword (e.g. 'panadol', 'aspirin'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-al-dawaa-com-api-e2f4633e/search_medication \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>","query":"<string>"}'
```
