Spaces:
Sleeping
Sleeping
|
Download README.md from bugrahans/blinkit-scraper: direct link, hf CLI and curl.
- Browser
- Download file 4.16 kB
-
https://huggingface.co/spaces/bugrahans/blinkit-scraper/resolve/main/README.md
- Command line
-
hf download hf://spaces/bugrahans/blinkit-scraper/README.md
-
curl -L -o README.md https://huggingface.co/spaces/bugrahans/blinkit-scraper/resolve/main/README.md
4.16 kB
| title: Blinkit Scraper | |
| short_description: Blinkit prices, MRP, stock per dark store and FSSAI data | |
| emoji: ⚡ | |
| colorFrom: yellow | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: 6.0.2 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| tags: | |
| - blinkit | |
| - blinkit-scraper | |
| - quick-commerce | |
| - grocery | |
| - india | |
| - price-monitoring | |
| - stock-monitoring | |
| - ecommerce | |
| - product-data | |
| - web-scraping | |
| - scraper | |
| - data-extraction | |
| - smolagents | |
| - tool | |
| - scrape.do | |
| # Blinkit Scraper — Powered by Scrape.do | |
| Blinkit is India's 10-minute grocery app. Every product card on its website carries | |
| the selling price, the printed MRP, the discount and the number of units the dark | |
| store holds. This Space turns a whole Blinkit category into a table of those numbers | |
| **for the store that serves the delivery location you pick**, and turns product pages | |
| into a catalog sheet with FSSAI licence, shelf life, ingredients and manufacturer. | |
| ## 🔑 Get your free API token | |
| 👉 **[Sign up free on Scrape.do](https://dashboard.scrape.do/sign-up?utm_source=huggingface&utm_medium=blinkit-scraper)** — 1,000 free credits per month, no credit card required. Every Blinkit request costs 10 credits. | |
| ## Two tabs | |
| | Tab | Input | Output | | |
| | --- | --- | --- | | |
| | **Category listings** | A Blinkit category link, a delivery location and a number of pages | Product cards with pack size, price, MRP, discount, in-stock flag, units in stock, rating and rating count; a table and a CSV | | |
| | **Product details** | A Blinkit product link and a delivery location | Price, MRP, stock, pack size, FSSAI licence, shelf life, country of origin, ingredients, manufacturer, return policy, images and every attribute Blinkit lists | | |
| Any product from the listing can be sent to the details tab with one click. | |
| ## Why an API instead of requesting blinkit.com directly | |
| Blinkit sits behind Cloudflare: a Python request gets HTTP 403 and an error page, | |
| with any user agent. Through | |
| [Scrape.do](https://scrape.do/?utm_source=huggingface&utm_medium=blinkit-scraper) | |
| each request goes through residential proxies in India (`super=true&geoCode=in`, | |
| 10 credits, about 3 seconds) and comes back in full, with the data already in the | |
| HTML as `window.grofers.PRELOADED_STATE`. | |
| Good to know: | |
| - **Location picks the store.** Prices, assortment and stock belong to one dark store. In our test the chips category had 673 products in Gurugram and 524 in Mumbai, and the same pack had 5 units in one store and 1 in the other. Pages read the location from cookies, the listing API from `lat` / `lon` headers; the Space sends both. | |
| - **Pagination is a POST API.** A category page holds 30 products; the rest come from Blinkit's `/v1/layout/listing_widgets`, 15 per call, each response pointing to the next. | |
| - **Stock tops out at 50.** Blinkit stops counting there; the Space shows "50+". | |
| - **Rating counts** arrive in Indian units ("7 lac" = 700,000) and are converted. | |
| ## Use as a smolagents Tool | |
| ```python | |
| from smolagents import CodeAgent, InferenceClientModel | |
| from tool import ScrapeDoBlinkitTool | |
| agent = CodeAgent( | |
| tools=[ScrapeDoBlinkitTool(api_token="YOUR_SCRAPEDO_TOKEN")], | |
| model=InferenceClientModel(), | |
| ) | |
| agent.run("Which chips are low on stock in Mumbai? https://blinkit.com/cn/chips-crisps/cid/1237/940") | |
| ``` | |
| You can also set `SCRAPE_DO_API_TOKEN` in your environment and instantiate | |
| `ScrapeDoBlinkitTool()` with no arguments. | |
| ## Inputs | |
| - `mode` *(required)* — `category` or `product`. | |
| - `url` *(required)* — A Blinkit category URL (`/cn/.../cid/...`) for `category`, or a product URL (`/prn/.../prid/...`) for `product`. | |
| - `location` *(optional)* — A city (Gurugram, Delhi, Mumbai, Bengaluru, Hyderabad, Pune, Kolkata, Chennai) or `lat,lon`. Default Gurugram. | |
| - `max_pages` *(optional)* — For `category`: pages to read (30 products, then 15 per page). Default 1, maximum 10. | |
| --- | |
| Prefer plain Python? `pip install blinkit-scraper` ([GitHub](https://github.com/bugrahansss/blinkit-scraper)) · No-code: [Apify actor](https://apify.com/scrapedo/blinkit-scraper) · [scrape.do](https://scrape.do/?utm_source=huggingface&utm_medium=blinkit-scraper) · [Documentation](https://scrape.do/documentation/) | |