Marketplace
No threads yet
Live

get_medicine_category_hierarchy

1mg.com

Retrieves the full medicine and health product category hierarchy from https://1mg.com. Returns top-level categories and nested children as a category tree.

Parameters2
Runs8
Updated8d ago
Operational8 runs · 100% succeeded
30 days agotoday

Playground

Runs on Notte and spends your workspace credits — what comes back is the live response, not a sample.

What is get_medicine_category_hierarchy?

Retrieves the full medicine and health product category hierarchy from https://1mg.com. Returns top-level categories and nested children as a category tree. It runs on Notte's browser infrastructure and returns structured JSON, so you can call it like any other API — pass city, locale and get the result back without maintaining a scraper.

Response

{
  "site": "<string>",
  "categories": [
    {
      "id": "<string>",
      "url": "<string>",
      "name": "<string>",
      "slug": "<string>",
      "level": 0,
      "children": [
        "<any>"
      ],
      "position": 0,
      "image_url": "<string>",
      "cover_image": "<string>",
      "internal_id": "<string>",
      "pydantic_id": "<string>",
      "display_text": "<string>"
    }
  ],
  "top_level_count": 0
}

Call it

curl --location 'https://us-prod.notte.cc/functions/ae320802-cc95-46a2-9c82-e9c6646bca88/runs/start' \
--header 'x-notte-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
    "function_id": "ae320802-cc95-46a2-9c82-e9c6646bca88",
    "variables": {
        "city": "Gurgaon",
        "locale": "en"
    }
}'

Ask an agent

Paste this into Claude Code, Cursor or any MCP client to have an agent call this function for you.

prompt
Use the Anything API MCP server (https://anything.notte.cc/mcp).

Call run(function_id="ae320802-cc95-46a2-9c82-e9c6646bca88") — the "get_medicine_category_hierarchy" function, which retrieves the full medicine and health product category hierarchy from https://1mg.com. Returns top-level categories and nested children as a category tree..

It takes city (str), locale (str). Return the result as structured JSON.