Quickstart
A step-by-step guide to help you scrape data quickly using MrScraper.
This guide shows you how to make your first scraping request with MrScraper.
Make Your First API Request
Before You Start
Generate an API token by following the instructions in the Token Plan guide.
In this quickstart, you'll scrape a Walmart product page using the General AI Agent to get the following data:
- Product name
- Price
- Rating
- Number of reviews
- Product link
curl --location --request POST 'https://api.mrscraper.com?token=<MRSCRAPER_API_TOKEN>&html=true&super=true' \
-H 'x-api-token: <MRSCRAPER_API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.walmart.com/ip/IdeaPad-Slim-3x-15-Laptop-Snapdragon-X-X1-26-100-16GB-RAM-512GB-SSD-Luna-Grey/19075520026",
"prompt": "Extract the following information in JSON format:\n\nproduct_name\nprice\nrating\nnumber_of_reviews\nproduct_link",
"agent": "general"
}'Try it in the Playground
Run this request instantly without writing any code.
The response contains the extracted data from the page.
{
"success": true,
"data": {
"product_name": "Lenovo IdeaPad Slim 3x 15.3\" Laptop AI Snapdragon X 16GB 512GB SSD Luna Grey",
"price": 449,
"rating": 4.5,
"number_of_reviews": 103,
"product_link": "https://www.walmart.com/ip/IdeaPad-Slim-3x-15-Laptop-Snapdragon-X-X1-26-100-16GB-RAM-512GB-SSD-Luna-Grey/19075520026"
},
"thread_id": "cebfaa37-f6de-45e7-8dd4-ec955824d81b",
"token_usage": 16,
"markdown": "",
"screenshot": "",
"status": "Converting data to JSON",
"error": "",
"runtime": 14852
}Use a Predefined Marketplace API
MrScraper also provides ready-to-use scraping APIs through the Marketplace.
These APIs are designed for specific industries and websites. You do not need to create prompts or extraction logic yourself.
Available categories include:
- E-commerce
- News
- Real Estate
- Travel
- And more
Explore Marketplace APIs
Browse and test ready-to-use scrapers.
For example, you can use the Amazon Product Details API to extract product information from an Amazon product page.
curl --location --request POST 'https://sync.scraper.mrscraper.com/api/amazon/pdp/sync' \
-H 'Authorization: bearer <MRSCRAPER_API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.amazon.com/STANLEY-Flowstate-3-Position-Compatible-Insulated/dp/B0CP9YB3Q4/ref=zg_bs_c_kitchen_d_sccl_2/145-6361404-7555432?pd_rd_w=3BPkW&content-id=amzn1.sym.fef9af56-6177-46e9-8710-a5293a68dd39&pf_rd_p=fef9af56-6177-46e9-8710-a5293a68dd39&pf_rd_r=E598BMWHB9QEZ75X7ABP&pd_rd_wg=Z9psI&pd_rd_r=7e3be220-af38-4e7b-b45c-9a68470a3e1f&pd_rd_i=B0CP9YB3Q4&th=1"
}'The response contains the extracted data from the page.
{
"success": true,
"message": "Successfully scraped",
"data": [
{
"pageNumber": 1,
"payload": {
"templates": [],
"mods": {
"filter": {
"tItemType": "nt_filter",
"filterItems": [
{
"name": "category",
"unfoldRow": "2",
"title": "Category",
"urlKey": "category",
"hidden": false,
"locked": false,
"type": "category",
"uniqueName": "category",
"value": "",
"displayValue": "",
"options": [
{
"url": "/beli-sabun-pembersih-wajah/?q=159947433",
"title": "Facial Cleanser",
"value": "beli-sabun-pembersih-wajah"
}
]
},
{
"name": "brand",
"unfoldRow": "-1",
"title": "Brand",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "brand",
"uniqueName": "20000",
"options": [
{
"title": "Men's Biore",
"value": "men-s-biore"
}
]
},
{
"name": "service",
"unfoldRow": "4",
"title": "Service & Promotion",
"urlKey": "service",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "service",
"options": [
{
"title": "Fulfilled By Lazada",
"value": "FBL",
"activeIcon": "",
"normalIcon": ""
},
{
"title": "Cash On Delivery",
"value": "COD",
"activeIcon": "",
"normalIcon": ""
},
{
"title": "Coins",
"value": "coins",
"activeIcon": "",
"normalIcon": ""
},
{
"title": "6.6 Sale",
"value": "gcp_D6",
"activeIcon": "https://img.lazcdn.com/us/lazgcp/e0557f6e-169b-45ec-91c4-e9e30eb17160_ALL-60-60.png",
"normalIcon": "https://img.lazcdn.com/us/lazgcp/e0557f6e-169b-45ec-91c4-e9e30eb17160_ALL-60-60.png"
}
]
},
{
"name": "location",
"unfoldRow": "3",
"title": "Shipped From",
"urlKey": "location",
"hidden": false,
"locked": false,
"type": "location",
"uniqueName": "location",
"value": [],
"options": [
{
"title": "East Java",
"value": "A-ID-4"
},
{
"title": "Jabodetabek",
"value": "A-ID-1"
},
{
"title": "North Sumatera",
"value": "A-ID-6"
},
{
"title": "Kota Depok",
"value": "R80010434"
},
{
"title": "Kab. Sidoarjo",
"value": "R80010303"
},
{
"title": "Kab. Deli Serdang",
"value": "R80010265"
}
]
},
{
"showMin": "Min",
"showMax": "Max",
"name": "price",
"unfoldRow": "2",
"title": "Price",
"urlKey": "price",
"hidden": false,
"locked": false,
"type": "price",
"uniqueName": "price"
},
{
"name": "rating",
"unfoldRow": "2",
"title": "Rating",
"urlKey": "rating",
"hidden": false,
"locked": false,
"type": "rating",
"uniqueName": "rating",
"value": "0"
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Skin Care Benefits",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "40385",
"options": [
{
"title": "Oil Control",
"value": "40385:135942"
},
{
"title": "Pore Control",
"value": "40385:135951"
},
{
"title": "Brightening",
"value": "40385:228695"
}
]
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Skin Types",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "30740",
"options": [
{
"title": "Normal",
"value": "30740:60807"
},
{
"title": "Oily",
"value": "30740:60839"
}
]
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Skin Concerns",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "40391",
"options": [
{
"title": "Oiliness",
"value": "40391:71277"
},
{
"title": "Dullness",
"value": "40391:135957"
}
]
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Product Feature",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "120024468",
"options": [
{
"title": "Paraben-free",
"value": "120024468:136834"
}
]
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Product Form",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "30780",
"options": [
{
"title": "Foam",
"value": "30780:68564"
}
]
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Ingredient Preference",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "120150202",
"options": [
{
"title": "Niacinamide",
"value": "120150202:123811818"
}
]
},
{
"name": "attribute",
"unfoldRow": "-1",
"title": "Special Claims",
"urlKey": "ppath",
"hidden": false,
"locked": false,
"type": "multiple",
"uniqueName": "120023693",
"options": [
{
"title": "BPOM Registered",
"value": "120023693:127537215"
}
]
}
],
"filteredQuatity": "1",
"filteredDoneText": "Product",
"title": "Search Filter",
"pos": 0
},
"listItems": [
{
"name": "Men's Biore Double Scrub Facial Foam Cool Oil Clear 100gr",
"nid": "159947433",
"itemId": "159947433",
"icons": [
{
"domClass": "120014",
"text": "Voucher save 4%",
"type": "text",
"group": "2",
"showType": "0",
"bizType": "voucherApplied"
},
{
"domClass": "225188",
"type": "img",
"group": "3",
"showType": "0",
"bizType": "campaign"
},
{
"domClass": "68675",
"type": "img",
"group": "3",
"showType": "0",
"bizType": "lazMall"
}
],
"image": "https://id-live-01.slatic.net/p/282e6a2fbf26571c3c5eab569e609852.jpg",
"isSmartImage": false,
"originalPriceShow": "",
"priceShow": "Rp32.200",
"discount": "4% Off",
"ratingScore": "4.864764860348532",
"review": "8378",
"location": "Kota Depok",
"thumbs": [],
"sellerName": "KAO Store",
"sellerId": "1000001053",
"brandName": "Men's Biore",
"brandId": "116687",
"cheapest_sku": "BI568HBACHV3ANID-136017",
"skuId": "181742191",
"sku": "BI568HBACHV3ANID",
"categories": [
3509,
3902,
18067,
18216
],
"price": "32200",
"restrictedAge": 0,
"inStock": true,
"originalPrice": "33600",
"clickTrace": "query:159947433;nid:159947433;src:LazadaMainSrp;rn:223837b9b80f3a6303f7c1f263ef8577;region:id;sku:BI568HBACHV3ANID;price:32200;client:desktop;supplier_id:1000001053;session_id:;biz_source:h5_internal;slot:0;utlog_bucket_id:470687;asc_category_id:18216;item_id:159947433;sku_id:181742191;shop_id:16328;templateInfo:-1_A3_C#107879_E#",
"itemSoldCntShow": "41.5K sold",
"longImageDisplayable": false,
"skus": [
{
"id": "BI568HBACHV3ANID-136017"
}
],
"promotionId": "",
"isSponsored": false,
"tItemType": "nt_product",
"skuType": "2",
"adFlag": "0",
"directSimilarUrl": "https://native.m.lazada.com/dynamicxresult?item_img=https%3A%2F%2Fid-live-01.slatic.net%2Fp%2F282e6a2fbf26571c3c5eab569e609852.jpg&src=srp_findsimilar&item_id=159947433&sku_id=181742191¶ms=%7B%22sub_src%22%3A%22long_press%22%2C%22src%22%3A%22srp_findsimilar%22%7D&m=tpp_findSimilar&q=159947433&similarType=findSimilarV1&price=32200.00&spuTriggerItem=0",
"gridTitleLine": "2",
"isFission": "0",
"isBadgeAutoScroll": false,
"showCart": false,
"showBackIcon": false,
"showUnitPrice": false,
"itemUrl": "//www.lazada.co.id/products/pdp-i159947433.html",
"querystring": "fs_ab=2&priceCompare=skuId%3A181742191%3Bsource%3Alazada-search-voucher%3Bsn%3A223837b9b80f3a6303f7c1f263ef8577%3BoriginPrice%3A3220000%3BdisplayPrice%3A3220000%3BisGray%3Afalse%3BsinglePromotionId%3A910000049169004%3BsingleToolCode%3ApromPrice%3BvoucherPricePlugin%3A0%3Btimestamp%3A1780565848388&c=&ratingscore=4.864764860348532&freeshipping=0&source=search&channelLpJumpArgs=&fuse_fs=&search=1&sale=41518&price=3.22E%204&review=8378&location=Kota%20Depok&stock=1&lang=en&request_id=223837b9b80f3a6303f7c1f263ef8577&clickTrackInfo=query%253A159947433%253Bnid%253A159947433%253Bsrc%253ALazadaMainSrp%253Brn%253A223837b9b80f3a6303f7c1f263ef8577%253Bregion%253Aid%253Bsku%253ABI568HBACHV3ANID%253Bprice%253A32200%253Bclient%253Adesktop%253Bsupplier_id%253A1000001053%253Bsession_id%253A%253Bbiz_source%253Ah5_internal%253Bslot%253A0%253Butlog_bucket_id%253A470687%253Basc_category_id%253A18216%253Bitem_id%253A159947433%253Bsku_id%253A181742191%253Bshop_id%253A16328%253BtemplateInfo%253A-1_A3_C%2523107879_E%2523"
}
],
"breadcrumb": [
{
"url": "https://www.lazada.co.id",
"title": "Home"
},
{
"title": "Search Results"
}
],
"sortBar": {
"tItemType": "nt_sortbar",
"filter": "Filter",
"style": "wf",
"sortItems": [
{
"name": "Popularity",
"tip": "Best Match",
"isActive": "true",
"value": "popularity",
"key": "sort",
"tabName": ""
},
{
"name": "Price-ASC",
"tip": "Price low to high",
"value": "priceasc",
"key": "sort",
"tabName": ""
},
{
"name": "Price-DESC",
"tip": "Price high to low",
"value": "pricedesc",
"key": "sort",
"tabName": ""
}
],
"hiddenLayoutBtn": false,
"showFilterBtn": true,
"hasFilter": false
},
"resultTips": {
"tItemType": "nt_resulttips",
"tips": "1 items found for \"{$0}\"",
"keywords": [
{
"text": "159947433"
}
]
},
"linksInfo": []
},
"mainInfo": {
"errorMsg": "",
"bizCode": 0,
"serverParams": "translatedEnQuery%3D159947433%26in_sufficient_relevant_items%3D1%26",
"totalResults": "1",
"pageSize": "40",
"page": "1",
"hiddenLayoutBtn": false,
"layoutInfo": {
"listHeader": [
"didYouMean",
"campaignBanner",
"categoryBar",
"brandBar",
"superStore",
"banner",
"resultTips",
"navCategory",
"hotDeal",
"emptyResult",
"recQuery",
"emptyResultBannerTips",
"limitedResult",
"recommendTitle"
],
"stickyHeader": [
"reminderBanner"
],
"sceneHeader": [],
"halfStickyHeader": [
"sortBar",
"preposeFilter"
],
"bottomHalfStickyHeader": []
},
"pageType": "searchList",
"gridTitleLine": "2",
"trackParams": {},
"userId": "",
"cate_id": "",
"hyperspaceInfo": "",
"currency": "Rp",
"currencyOnRight": "false",
"currencySpace": "false",
"isShowFeedbackForm": "false",
"showThumbs": "false",
"allProductURL": "/all-products/",
"addToCartURL": "//cart.lazada.co.id/cart/api/add",
"cluster": "fiber2_os30",
"column": 2,
"bucketId": "mobile_v4",
"auctionType": 1,
"noMorePages": true,
"srpName": "LazadaMainSrp",
"params": "{\"src\":\"h5_internal\"}",
"searchScenario": "keyword",
"hiddenShopChangeBtn": true,
"selectedFilters": {},
"expParams": {
"disableTileSimple": "1",
"isBadgeAutoScroll": "0",
"filterLazyLoad": "0",
"funnelFilterBtnPosition": "sortBarContainerRight",
"enableShortStyle": "0",
"enableFeedbackAssistant": "1",
"disableScreenSimple": "1",
"enableCompactLineHeight": "1",
"disableFspImagePreload": "0"
},
"filterLazyLoad": false,
"RN": "223837b9b80f3a6303f7c1f263ef8577",
"style": "wf",
"title": "159947433",
"lang": "en",
"venture": "ID",
"themes": [
{
"font-size": "11",
"labelMarginLeft": "0",
"color": "#FF0066",
"key": "120014"
},
{
"img": "https://img.lazcdn.com/us/lzd-onepiece/e09da34c2fe4a880c5c286c8850d9fbd1755779562798.png",
"width": "117",
"labelMarginLeft": "0",
"key": "68675",
"height": "36"
},
{
"img": "https://img.lazcdn.com/us/lazgcp/a49c11fa-1ebb-468b-bcd6-ad3ba69ef827_ALL-112-52.png",
"width": "112",
"labelMarginLeft": "0",
"key": "225188",
"height": "52"
}
],
"q": "159947433",
"rt": {
"all": 179
},
"serverResponseTime": 1780565848,
"reqParams": "{\"src\":\"h5_internal\",\"refer\":\"https://www.lazada.co.id/\",\"scenario\":\"keyword-dynamic\",\"ab_test\":\"BASE:0\"}",
"pageTitle": "159947433 - Harga & Promo Terbaik | Lazada Indonesia"
},
"seoInfo": {
"pageTitle": "159947433 - Harga & Promo Terbaik | Lazada Indonesia",
"description": "Cari 159947433? Lazada Indonesia adalah tempat berkumpulnya toko lokal dan internasional tepercaya! Nikmati belanja lebih aman dan nyaman dengan produk asli, pengiriman cepat, harga terbaik. Belanja sekarang dengan kebijakan pengembalian mudah dan pembayaran aman!",
"robotsContent": "index,follow",
"canonicalHref": "/catalog/?q=159947433",
"androidDeepLink": "android-app://com.lazada.android/lazada/id/page?url_key=%2Fcatalog%2F%3Fq%3D159947433&utm_campaign=%2Fcatalog%2F%3Fq%3D159947433&utm_medium=organic&utm_source=google_app_indexing&utm_from=search",
"nextHref": "/catalog/?page=2&q=159947433",
"internalLink": [],
"h1": "",
"itemListSchema": {
"@context": "https://schema.org",
"@type": "ItemList",
"name": "Best Selling 159947433 Products",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@type": "Product",
"name": "Men's Biore Double Scrub Facial Foam Cool Oil Clear 100gr",
"image": "https://id-live-01.slatic.net/p/282e6a2fbf26571c3c5eab569e609852.jpg",
"url": "//www.lazada.co.id/products/pdp-i159947433.html",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.9",
"ratingCount": 8378
}
}
}
]
},
"breadcrumbSchema": {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"item": {
"@id": "https://www.lazada.co.id",
"name": "Home"
},
"@type": "ListItem",
"position": 1
}
]
},
"breadcrumbData": [
{
"categoryName": "Home",
"categoryLink": "https://www.lazada.co.id"
},
{
"categoryName": "Search Results"
}
],
"productSchema": {
"@type": "Product",
"@context": "https://schema.org",
"name": "Men's Biore Double Scrub Facial Foam Cool Oil Clear 100gr",
"image": "https://id-live-01.slatic.net/p/282e6a2fbf26571c3c5eab569e609852.jpg",
"sku": "BI568HBACHV3ANID",
"mpn": "181742191",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.9",
"ratingCount": 8378
},
"brand": {
"@type": "Organization",
"name": "Men's Biore"
}
}
}
}
}
],
"tokenUsage": 10
}