Netmeds Categories
netmeds.categories.list
List the full Netmeds category tree: departments, then level 1, 2 and 3 categories, each with the slug the search filter expects.
At a glance
- Endpoint ID
netmeds.categories.list- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 30 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "netmeds.categories.list", "input": {}}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "netmeds.categories.list", "input": {}}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "netmeds.categories.list", "input": {}}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
This endpoint takes an empty input object.
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "departments": [ { "name": "Beauty", "slug": "beauty", "categories": [ { "name": "Hair", "ambiguous": true, "department": "beauty", "id": "694", "slug": "hair", "children": [ { "name": "Hair Care", "ambiguous": true, "department": "beauty", "id": "720", "slug": "hair-care", "children": [ { "name": "Shampoos", "ambiguous": true, "department": "beauty", "id": "824", "slug": "shampoos" }, { "name": "Hair Oils", "ambiguous": true, "department": "beauty", "id": "820", "slug": "hair-oils" } ] }, { "name": "Hair Tools & Accessories", "ambiguous": true, "department": "beauty", "id": "780", "slug": "hair-tools-accessories", "children": [ { "name": "Hair Brushes", "department": "beauty", "id": "1125", "slug": "hair-brushes" }, { "name": "Hair Combs", "ambiguous": true, "department": "beauty", "id": "1120", "slug": "hair-combs" } ] } ] }, { "name": "Fragrances", "ambiguous": true, "department": "beauty", "id": "697", "slug": "fragrances", "children": [ { "name": "Men", "ambiguous": true, "department": "beauty", "id": "724", "slug": "men", "children": [ { "name": "Men Deodorants/Roll-Ons", "ambiguous": true, "department": "beauty", "id": "828", "slug": "men-deodorants-roll-ons" }, { "name": "Men Perfumes (Edt/Edp)", "ambiguous": true, "department": "beauty", "id": "846", "slug": "men-perfumes-edt-edp" } ] }, { "name": "Unisex", "ambiguous": true, "department": "beauty", "id": "725", "slug": "unisex", "children": [ { "name": "Deodorants/Roll-Ons", "ambiguous": true, "department": "beauty", "id": "829", "slug": "deodorants-roll-ons" }, { "name": "Perfumes (Edt/Edp)", "ambiguous": true, "department": "beauty", "id": "876", "slug": "perfumes-edt-edp" } ] } ] } ] }, { "name": "Medicine", "slug": "medicine", "categories": [ { "name": "Cardiovascular & Hematopoietic System", "department": "medicine", "id": "6", "slug": "cardiovascular-hematopoietic-system", "children": [ { "name": "Anticoagulants, Antiplatelets & Fibrinolytics (Thrombolytics)", "department": "medicine", "id": "46", "slug": "anticoagulants-antiplatelets-fibrinolytics-thrombolytics", "children": [ { "name": "Blood Clot-Ant", "department": "medicine", "id": "236", "slug": "blood-clot-ant" }, { "name": "Bleeding Disorders-AAF", "department": "medicine", "id": "235", "slug": "bleeding-disorders-aaf" } ] }, { "name": "Diuretics", "department": "medicine", "id": "62", "slug": "diuretics", "children": [ { "name": "Hypertension-Diu", "department": "medicine", "id": "247", "slug": "hypertension-diu" }, { "name": "Urinary Retention-Diu", "department": "medicine", "id": "248", "slug": "urinary-retention-diu" } ] } ] }, { "name": "Endocrine & Metabolic System", "department": "medicine", "id": "12", "slug": "endocrine-metabolic-system", "children": [ { "name": "Antidiabetic Agents", "department": "medicine", "id": "108", "slug": "antidiabetic-agents", "children": [ { "name": "Diabetes-Ant", "department": "medicine", "id": "454", "slug": "diabetes-ant" } ] }, { "name": "Agents Affecting Bone Metabolism", "department": "medicine", "id": "107", "slug": "agents-affecting-bone-metabolism", "children": [ { "name": "Bone Metabolism-Age", "department": "medicine", "id": "450", "slug": "bone-metabolism-age" }, { "name": "Osteoporosis-Age", "department": "medicine", "id": "451", "slug": "osteoporosis-age" } ] } ] } ] } ]}
Fields
| Field | Type | Example |
|---|---|---|
departments[].categories[].name |
string | Hair |
departments[].name |
string | Beauty |
departments[].categories |
array | 2 records |
departments[].categories[].ambiguous |
boolean | true |
departments[].categories[].children |
array | 2 records |
departments[].categories[].department |
string | beauty |
departments[].categories[].id |
string | 694 |
departments[].categories[].slug |
string | hair |
departments[].slug |
string | beauty |
departments |
array | 2 records |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Netmeds endpoints
Something missing or unclear? Ask the team that builds the Netmeds endpoints.