A PHP script to fetch and save product IDs from Okala's online store API across multiple categories and store branches.
This tool automates data collection across multiple store branches and product categories, making it ideal for inventory tracking, price monitoring, or data analysis. Efficient, lightweight, and easy to integrate.
- Reads store IDs from
store-ids.txt - Iterates over a predefined list of product categories
- Sends HTTP requests to Okala's API for each store-category combination
- Extracts product IDs and saves them to
product-ids.txtinstoreId:productIdformat - Provides real-time feedback via browser while running
git clone https://github.com/BaseMax/okala-product-ids.git
cd okala-product-idsAdd one store ID per line in store-ids.txt.
Place okala-save-product-ids.php on a local or remote PHP server.
php okala-save-product-ids.phpThe product IDs will be saved to product-ids.txt in the format:
storeId:productId storeId:productId ...
PHP 7.4 or higher
cURL enabled in PHP
Network access to Okala's API
The script uses hardcoded headers including a Bearer token. Update the token if it expires.
Execution is not rate-limited beyond a short usleep(500000) between requests — be mindful of API rate limits.
Use with permission; scraping public APIs may violate terms of service.
MIT License
Copyright (c) 2025 Max Base