Inscrap is a small command-line tool for exporting product catalogs from
InSales stores. It reads product URLs from a
sitemap.xml, fetches product data through the store's JSON API, and writes
the result to a file.
It is useful when you need to quickly collect product titles, descriptions, prices, stock levels, images, and variants without browsing the catalog manually.
Requirements: Python 3.13 or newer and, preferably, uv.
Run Inscrap directly from a cloned repository:
uv run inscrap run https://shop.example.com -o products.xlsxYou can pass a sitemap URL instead of the store URL:
uv run inscrap run https://shop.example.com/sitemap.xmlWithout -o, the result is saved as products.json in the current directory.
Install Inscrap as a global uv tool to use it from any directory:
uv tool install .Check the installation:
inscrap run --helpYou can also build and install a wheel:
uv build
uv tool install dist/insales_scraper-1.1.0-py3-none-any.whlOr install a wheel from a specific path:
uv tool install /path/to/insales_scraper-1.0-py3-none-any.whlRemove the global installation with:
uv tool uninstall insales-scraperAfter installation, the command is:
inscrap run URL [OPTIONS]Choose the output format by changing the file extension:
inscrap run https://shop.example.com -o products.json
inscrap run https://shop.example.com -o products.csv
inscrap run https://shop.example.com -o products.xlsx
inscrap run https://shop.example.com -o products.txtThe output directory must already exist:
mkdir -p data
inscrap run https://shop.example.com -o data/catalog.xlsx| Option | Description | Default |
|---|---|---|
-o, --output |
Output path. The format is selected by the .json, .csv, .xlsx, or .txt extension. |
products.json |
-c, --concurrency |
Number of concurrent requests, from 1 to 50. | 5 |
-r, --retries |
Number of retry attempts after a request error. | 5 |
-t, --transport |
HTTP transport: httpx or curl_cffi. |
httpx |
-f, --fatalist |
Stop the export after the first product request error. | disabled |
-p, --proxy |
Proxy URL used for HTTP requests. | not set |
For a large catalog, increase concurrency gradually so you do not put unnecessary load on the store:
inscrap run https://shop.example.com -c 10 -r 3 -o catalog.csvList the available HTTP transports with:
inscrap transportEach product includes its ID, title, description, URL, availability, images, and variants. Each variant includes its own ID, title, SKU, barcode, availability, quantity, current price, and old price.
| Format | Data layout |
|---|---|
| JSON | The complete nested structure with products and their variants. |
| CSV / XLSX | One row per variant. Product fields are repeated for each of its variants. |
| TXT | A text representation of the scraped products. |
- Inscrap opens the provided
sitemap.xml. If you pass a store URL, it adds/sitemap.xml. - It keeps sitemap links that contain
/product/. - It requests the JSON version of each product page by adding
.jsonto the product URL. - It saves successfully loaded products to the selected file. By default, products with errors are skipped, and their number is included in the final statistics.
Typer and Rich power the CLI. HTTP requests use httpx or curl-cffi,
and exports use polars and xlsxwriter.