Scraping API

Tokopedia product pages, search results and shop catalogs as JSON, on request.

Endpoints3
Region1id
Product page2 credits≈ $2.5 per 1,000

Free trial credits. Catalog and estimates work immediately.

Need monthly sales and market share instead? Tokopedia market data →

Search Tokopedia by keywordRequest
POST/v1/tokopedia/search/bulk/submit
GET/v1/tokopedia/search/bulk/retrieve/<job_id>
{
  "items": [
    {
      "list_type": "search",
      "keyword": "sabun mandi",
      "product_limit": 60
    }
  ]
}
Results for one keyword, trimmed to 2 productsfull response ↓
{
  "keyword": "sabun mandi",
  "list_type": "search",
  "pages_fetched": 40,
  "total_unique_ids": 1849,
  "products": [
    {
      "id": "102407389499",
      "name": "Grace and Glow Brightening Body Wash 400ml | Shower Gel Grace and Glow | English Pear, Rouge540 | Sabun Mandi Cair Wangi Parfum yang Mencerahkan, Membersihkan, Melembutkan Tubuh, Kulit Lebih Segar & Tangan Terawat",
      "url": "https://www.tokopedia.com/graceandglowofficial/grace-and-glow-brightening-body-wash-shower-gel-grace-and-glow-english-pear-rouge540-miss-moisture-peony-sabun-mandi-cair-wangi-parfum-yang-mencerahkan-membersihkan-melembutkan-tubuh-kulit-lebih-segar-tangan-terawat-1732841867910939916?extParam=ivf%3Dtrue%26keyword%3Dsabun+mandi%26search_id%3D20260918063826D1F255A373A3CE32D7ZO%26src%3Dsearch",
      "price": {
        "text": "Rp18.500",
        "number": 18500,
        "range": "",
        "original": "Rp64.000",
        "discountPercentage": 0,
  …
Quickstart

Your first Tokopedia request

  1. 1

    Get a key. Sign in and create an API key in the dashboard. New accounts get free trial credits.

  2. 2

    Submit. POST your keywords to /v1/tokopedia/search/bulk/submit, up to 50 per request. You get a job ID back.

  3. 3

    Retrieve. Poll /v1/tokopedia/search/bulk/retrieve/{job_id}; when each item is complete, download it from its download_url straight away, because the links expire.

Search Tokopedia by keyword

curl -X POST https://api.magpieiq.com/scraping/v1/tokopedia/search/bulk/submit \
  -H "Authorization: Bearer $MAGPIE_API_KEY" -H "Content-Type: application/json" \
  -d '{"items": [{"list_type": "search", "keyword": "sabun mandi", "product_limit": 60}]}'
# -> {"job_id": "...", ...}

curl https://api.magpieiq.com/scraping/v1/tokopedia/search/bulk/retrieve/<job_id> \
  -H "Authorization: Bearer $MAGPIE_API_KEY"
# each completed item carries a download_url for its results

Results for one keyword, trimmed to 2 products

{
  "keyword": "sabun mandi",
  "list_type": "search",
  "pages_fetched": 40,
  "total_unique_ids": 1849,
  "products": [
    {
      "id": "102407389499",
      "name": "Grace and Glow Brightening Body Wash 400ml | Shower Gel Grace and Glow | English Pear, Rouge540 | Sabun Mandi Cair Wangi Parfum yang Mencerahkan, Membersihkan, Melembutkan Tubuh, Kulit Lebih Segar & Tangan Terawat",
      "url": "https://www.tokopedia.com/graceandglowofficial/grace-and-glow-brightening-body-wash-shower-gel-grace-and-glow-english-pear-rouge540-miss-moisture-peony-sabun-mandi-cair-wangi-parfum-yang-mencerahkan-membersihkan-melembutkan-tubuh-kulit-lebih-segar-tangan-terawat-1732841867910939916?extParam=ivf%3Dtrue%26keyword%3Dsabun+mandi%26search_id%3D20260918063826D1F255A373A3CE32D7ZO%26src%3Dsearch",
      "price": {
        "text": "Rp18.500",
        "number": 18500,
        "range": "",
        "original": "Rp64.000",
        "discountPercentage": 0,
        "__typename": "SearchProductV5Price"
      },
      "stock": {
        "ttsSKUID": "1732841867910939916",
        "__typename": "SearchProductV5Stock"
      },
      "rating": "4.9",
      "category": {
        "id": "2133",
        "name": "Perawatan Tubuh",
        "breadcrumb": "perawatan-tubuh/perlengkapan-mandi/sabun-mandi"
      },
      "shop": {
        "name": "Grace and Glow Indonesia_NEW",
        "city": "Kab. Bogor"
      }
    },
    {
      "id": "2217681166",
      "name": "NUVO FAMILY Sabun Mandi Cair Total Protect Pouch 800 g x2",
      "url": "https://www.tokopedia.com/wingsofficial/nuvo-family-sabun-mandi-cair-total-protect-pouch-800ml-x2-1729935252670745314?extParam=ivf%3Dfalse%26keyword%3Dsabun+mandi%26search_id%3D20260918063826D1F255A373A3CE32D7ZO%26src%3Dsearch%26whid%3D7386608",
      "price": {
        "text": "Rp25.400",
        "number": 25400,
        "range": "",
        "original": "Rp100.000",
        "discountPercentage": 0,
        "__typename": "SearchProductV5Price"
      },
      "stock": {
        "ttsSKUID": "1729935252670810850",
        "__typename": "SearchProductV5Stock"
      },
      "rating": "5.0",
      "category": {
        "id": "2133",
        "name": "Perawatan Tubuh",
        "breadcrumb": "perawatan-tubuh/perlengkapan-mandi/sabun-mandi"
      },
      "shop": {
        "name": "Wings Indonesia",
        "city": "Kab. Bekasi"
      }
    }
  ]
}
Reference

Tokopedia endpoints

Product page

/v1/tokopedia/pdp/bulk

Product detail for each item, including price and the exact lifetime sold count.

InputUp to 2,000 itemsproduct_keyshop_domain
No approval · any time2 credits / request· ≈ $2.5 per 1,000

Search and category listing

/v1/tokopedia/search/bulk

The products a keyword or category search returns, in order, with price, rating, category and shop.

InputUp to 50 taskskeyword or category IDlist_typeproduct_limit
No approval · any time1 credit / request· ≈ $1.25 per 1,000

Shop catalog

/v1/tokopedia/merchant/bulk

The products listed in one Tokopedia shop.

InputUp to 50 tasksshopidoptional keyword or max_pages
No approval · any time1 credit / request· ≈ $1.25 per 1,000
Response

Key fields in the response

FieldTypeMeaning
keyword / list_typestringWhat was searched and whether it was a keyword or category search.
pages_fetchedintegerResult pages collected for this search.
total_unique_idsintegerDistinct products found across those pages.
products[]arrayThe products in result order. A product's rank is its position, counting from 1.
products[].id / name / urlstringProduct ID, listing title and product URL.
products[].price.numberintegerCurrent price in rupiah.
products[].price.text / originalstringPrice as displayed, and the pre-discount price when shown.
products[].ratingstringAverage rating, 0–5.
products[].category.name / breadcrumbstringCategory name and path.
products[].shop.name / citystringShop name and the city it lists.
products[].stock.ttsSKUIDstringThe SKU identifier attached to the listing.
Pricing

What it costs, worked out

Cost

1,000 product pages, once

2,000credits

≈ $2.5

Cost

50 keywords searched every day for 30 days

1,500credits

≈ $1.88

Cost

20 competitor shops, once

20credits

≈ $0.03

Dollar figures use the Tier 1 credit rate. Pay-as-you-go top-ups cost more per credit and larger packs cost less; the rate card has every pack.

Credits are deducted when you submit; items that fail are refunded.

AI agents

Use it from Claude or ChatGPT

Give your assistant your keywords and your listings, and it tracks where you rank on Tokopedia search and who moved past you.

Paste into your assistant
Submit POST /v1/tokopedia/search/bulk/submit with {"items": [{"list_type": "search", "keyword": "<keyword>", "product_limit": 60}]} for each of my keywords (up to 50 per request). Poll GET /v1/tokopedia/search/bulk/retrieve/{job_id}, and download each item's download_url promptly and save it — the links expire.

A listing's rank is its position in the products array, counting from 1. Skip any product whose ads.id is filled — that slot is sponsored, not organic. Match my listings by id or shop.id and record rank per keyword per run, then show me who climbed past us since the last run.

The copied prompt also tells your assistant how to get you a key if you don’t have one yet, and to ask before spending credits.

Limits

Limits and processing

  • All three endpoints run at any time without approval.
  • Product page takes up to 2,000 items per request; search and shop catalog take up to 50 tasks per request.
  • Download each result from its download_url promptly; the links expire.
  • Search results come back in a fixed order that is close to, but not exactly, the default shopper view.
  • Tokopedia is an Indonesian marketplace; prices are in rupiah.
FAQ

Tokopedia API questions

Do I need a Tokopedia seller account?

No. You need a Magpie API key. Sign-up is self-serve and includes free trial credits.

How do I find a product's product_key and shop_domain?

Both are in the product URL: tokopedia.com/{shop_domain}/{product_key}. Copy them as they appear.

Can I track where my listings rank for a keyword?

Yes. Run the search endpoint for your keywords on a schedule; a listing's rank is its position in the products array.

Does it separate sponsored results?

Sponsored slots carry a filled ads.id in the search results, so you can skip them when you compute organic rank.

How is it billed?

In prepaid credits from one wallet shared with the Data API, per item or per task. The rate card shows every current price.

Can I get monthly sales totals instead of raw pages?

Yes. The Data API serves monthly GMV, units and market share for Tokopedia by brand, merchant and SKU, already cleaned and categorised.

Make your first Tokopedia request today.

Free trial credits. Catalog and estimates work immediately.