JSON Data Formats
March 14, 2026 · View on GitHub
This document describes the JSON files produced and consumed by PricyAPI, plus API response shapes.
1. Chain Metadata Registry
File: chains-resources.json
Purpose:
- Registry of supported chains and display metadata.
Typical record shape:
{
"chain_name": "SHUFERSAL",
"chain_name_he": "שופרסל",
"site_url": "https://prices.shufersal.co.il/"
}
Notes:
chain_nameis the technical key used in folder names and API params.chain_name_heis used as display label where available.
2. Chain Scraper Output: links-map
Path pattern:
chains/<CHAIN>/links-map.json
Purpose:
- Snapshot of discovered downloadable source files.
Top-level fields:
schema_version: integer format version (currently1)chain_name: chain keysource_url: base catalog/listing URLgenerated_at: ISO-8601 timestampmax_page_discovered: highest crawled page/index (when applicable)pages_crawled: pages actually visitedtotal_files: total discovered filesall_files: array of normalized file rowsby_type: map from file type (price,pricefull,promo,stores, etc.) to arrays of file rowslatest_by_branch: map of{file_type -> {store_id -> latest_file_row}}latest_by_type: map of{file_type -> latest_file_row}
all_files[] row fields (common):
download_urlfile_namefile_extfile_typefile_prefixchain_idbranch_idbranch_labelbranch_namepublished_atpublished_at_isofile_timestamp_iso- additional source-specific metadata such as
source_page,size,row_number
3. Branch Catalog Output: branches.json
Path pattern:
chains/<CHAIN>/branches.json
Purpose:
- Canonical list of stores/branches used for branch-level price fetch runs.
Top-level fields:
schema_versionchain_namegenerated_atsource: metadata for the Stores file usedrecord_count: total branch recordsrecords: array of normalized branch records
source fields (typical):
links_map_pathstores_file_namestores_download_urlstores_published_at_iso
records[] fields:
chain_idsub_chain_idstore_idstore_nameaddresscityzip_codephone
Notes:
- Some chains may omit or partially populate optional fields.
store_idis the filename key for per-store price files.
4. Per-Store Price Output
Path pattern:
chains/<CHAIN>/prices/<mode>/<store_id>.json
Where:
mode=fullusesPriceFullsource filesmode=refreshusesPricesource files
Top-level fields:
schema_versionchain_namegenerated_atsource: metadata on the source price filestore:{chain_id, sub_chain_id, store_id}record_countskipped_countrecords: array of normalized item price rows
source fields (typical):
links_map_pathmodefile_type_usedfile_namedownload_urlpublished_at_isopayload_format(xml,csv,zipvariant depending on chain/source)
records[] fields (typical):
chain_idsub_chain_idstore_iditem_code(barcode key used by API grouping)item_namemanufacturer_namemanufacturer_item_descriptionunit_of_measureunit_qtyquantityqty_in_packagepriceunit_of_measure_priceallow_discountitem_statusprice_update_date
Notes:
- Some fields can be null/missing by source.
- Numeric values are normalized where parsing succeeds, otherwise may remain string/null.
5. Batch Run Summary Output
Path pattern:
chains/<CHAIN>/prices/<mode>/run-summary-<mode>.json
Purpose:
- Execution result summary for
get_all_branches_prices.py.
Top-level fields:
schema_versionchain_namemodestarted_atfinished_atduration_secbranches_filelinks_mapoutput_dirtotal_requestedtotal_completedsuccess_countfailure_countfailures: high-level failures arrayresults: per-store execution details
results[] fields:
store_idstarted_atfinished_atduration_secoutput_filereturn_codestdoutstderrstatus(ok,failed, orskippeddepending on chain behavior)
6. API Search Response Formats
Endpoints:
GET /prices/by-barcodeGET /prices/by-name
Top-level response fields:
querytotal_itemsitems
Grouped items[] format (merged by barcode):
item_codeitem_namemanufacturer_namechains: technical chain keys in this item groupchain_names: display names for chains in this item groupprices: merged per-store rows across all chainsmin_pricemax_pricematch_score(mainly relevant for name search)
prices[] fields:
chainchain_namechain_idstore_idstore_namecitysub_chain_idpriceunit_of_measure_priceprice_update_dateallow_discountitem_status
7. Admin All-Chains Worker Status Format
Endpoint:
GET /admin/pipeline/all/status
Response:
worker: snapshot object
worker fields:
running: booleanjob_id: unique run idstarted_atfinished_atmodetotal_chainscompleted_chainssuccess_countfailure_countcurrent_chainreload_afterreload:{attempted, success, mode, meta|error}results: per-chain execution detailserror: worker-level fatal error string/null
worker.results[] fields:
chainstatus_codesuccessduration_secreturn_coderetried_with_scrapestdoutstderr
Notes:
stdoutandstderrare intentionally tail-truncated for bounded payload size.- Only one all-chains worker is active at a time.