Dis-Chem APIdischem.co.za ↗
Search Dis-Chem's catalog and retrieve product titles, prices, SKUs, and images via 3 endpoints. Covers search by keyword and lookup by URL slug.
What is the Dis-Chem API?
The Dis-Chem API gives developers access to South Africa's Dis-Chem pharmacy catalog through 3 endpoints, returning product titles, prices, SKUs, and catalog image arrays. Use search_product to find items by keyword and get back a matched product URL and all associated images, or call get_product_details with either a slug or a search query to retrieve structured pricing and SKU data.
curl -X GET 'https://api.parse.bot/scraper/305eea20-cd53-4922-95ed-a6cadbfa4645/search_product?query=aspirin' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace dischem-co-za-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Dis-Chem product lookup: search, get details, fetch images."""
from parse_apis.dis_chem_api import DisChem, ProductNotFound
client = DisChem()
# Search for a product's images by keyword
gallery = client.productimages.search(query="aspirin")
print(f"Found {gallery.image_count} image(s) at {gallery.product_url}")
# Get product details by slug (derived from the URL)
slug = gallery.product_url.rsplit("/", 1)[-1]
product = client.products.get(slug=slug)
print(f"Product: {product.title}, Price: {product.price}, SKU: {product.sku}")
# Fetch the full image set for the same product
images = client.productimages.get(slug=slug)
for url in images.images:
print(f" Image: {url}")
# Typed error handling: catch not-found
try:
client.products.search(query="zzz_nonexistent_item_xyz")
except ProductNotFound as exc:
print(f"Not found: {exc}")
print("Exercised: productimages.search / products.get / productimages.get / products.search (error)")
Search for a product by query on Dis-Chem and return the first matching product's page URL and all catalog images found on that product page. Useful for discovering product URLs and image assets from a keyword.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Product name or keywords to search for (e.g. 'aspirin', 'paracetamol'). |
{
"type": "object",
"fields": {
"images": "array of image URLs from the product catalog",
"image_count": "number of images found",
"product_url": "URL of the matched product page"
},
"sample": {
"data": {
"images": [
"https://www.dischem.co.za/api/catalog/product/D/i/Dis-Chem-Magento-Website-Placeholder-Image-pharmacist_1_36_32.png"
],
"image_count": 1,
"product_url": "https://www.dischem.co.za/bayer-aspirin-cardio-100mg-30-s-630"
},
"status": "success"
}
}About the Dis-Chem API
Endpoints and Data Returned
The API covers three operations against the Dis-Chem product catalog. search_product accepts a query string (e.g. 'paracetamol') and returns the URL of the first matched product page alongside an array of catalog image URLs and an image_count integer. get_product_images does the same image retrieval when you already have a product's URL slug (e.g. 'bayer-aspirin-cardio-100mg-30-s-630'), skipping the search step. get_product_details returns the four core fields: title, price (as a decimal string), sku, and url. It accepts a slug, a query, or both — if only a query is supplied, the first matching product is used.
Input Flexibility
get_product_details is the most flexible endpoint: pass a slug for a direct lookup, pass a query for a keyword-driven lookup, or pass both to anchor keyword results to a known product. The slug follows Dis-Chem's URL convention and typically encodes product name, dosage, and pack size, making it human-readable and stable for re-use across calls.
Coverage and Scope
All three endpoints target the Dis-Chem South African catalog. Prices are returned as decimal strings in South African Rand (ZAR), though the currency symbol is not included in the price field itself. Image arrays can contain multiple views of a single product; image_count tells you how many were found without having to measure the array length yourself.
The Dis-Chem API is a managed, monitored endpoint for dischem.co.za — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when dischem.co.za changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official dischem.co.za API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a price-tracking tool that monitors Dis-Chem's ZAR prices for specific medications over time using
get_product_details. - Populate a pharmacy comparison app with product titles, SKUs, and prices pulled from Dis-Chem's catalog.
- Generate product image galleries for a health and wellness content site using the image arrays from
get_product_images. - Automate catalog audits by searching known product names with
search_productand verifying the returned URLs still resolve. - Cross-reference SKUs from Dis-Chem against internal inventory databases using the
skufield fromget_product_details. - Enrich a dataset of South African healthcare products with catalog images by feeding slugs to
get_product_imagesin bulk.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Dis-Chem have an official developer API?+
What does the `price` field actually contain — is it a number or a formatted string?+
price is returned as a decimal string (e.g. '89.99'). It represents the current listed price in South African Rand. No currency symbol is included in the value, so you can parse it directly to a float for arithmetic.Does the API return stock availability or promotional pricing?+
title, price, sku, url, and catalog images. Stock availability, promotion labels, and loyalty-card pricing are not exposed. You can fork the API on Parse and revise it to add an endpoint that extracts those fields.Can I retrieve multiple search results, not just the first match?+
search_product and get_product_details (when given a query) return data for the first matching product only. You can fork the API on Parse and revise it to add pagination or a multi-result search endpoint.How specific should the `slug` parameter be?+
'bayer-aspirin-cardio-100mg-30-s-630'). You can obtain a valid slug by first calling search_product with a keyword and reading the product_url from the response.