February 06, 2026
Competitive pricing in food retail with automated collection of competitor data
Erica Fernanda Oliveira; Paula Bruzadelle Vieira
Summary elaborated by the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege focused on synthesis and writing.
This research developed and implemented a Python algorithm to automate the collection of competitor prices and assortment from the iFood marketplace, with data integration into Excel spreadsheets. The solution provides the analyzed company’s pricing area with a tool to measure the Competitiveness Index (IC%) and identify assortment gaps. The objective is to support agile and well-founded adjustments in pricing and product mix strategies, aligning the digital channel with market dynamics. The study demonstrates the benefits of a low-cost, data-driven approach, points out limitations, and suggests improvements, such as routine orchestration and the incorporation of more complex competitive variables.
Food retail in Brazil faces intense competitiveness, shaped by a new consumer profile and market pressures. Reports indicate that, in the post-pandemic period, consumers’ sensitivity to prices and search for variety have increased, raising the complexity of management for supermarkets (ABRAS, 2023; APAS, 2022). Pricing has become a pillar for balancing perceived value, competitiveness, and profitability. According to Nagle and Müller (2018), effective pricing requires understanding the value perceived by the consumer and the behavior of the competition. The ability to innovate in marketing and pricing is a determining factor for the sector’s sustainability (Berkhout, 2020).
Despite the importance of data-driven decisions, many retail companies still use intuition-based methods or manual processes (SA Varejo, 2022). The main obstacle is the difficulty in obtaining reliable and up-to-date information about competitors. Traditional methods, such as store visits or outsourced surveys, are costly, limited in scope and frequency, and prone to errors. In this scenario, web scraping — automated data extraction from websites — emerges as a strategic alternative. This approach allows for collecting information from marketplaces on a large scale and in near real-time, transforming public data into competitive intelligence (Mitchell, 2018). The applicability of the technique in the food sector was validated in studies such as Hillen’s (2019), which used it for price monitoring.
Business literature reinforces the benefits of this approach. Analyses by McKinsey & Company (2022) reveal that supermarkets that adjust prices based on systematic competitive benchmarking have up to 15% higher chances of expanding their margins. Customer satisfaction can increase by up to 20% when decisions are data-driven (Harvard Business Review, 2023). Provost and Fawcett (2013) argue that data-driven decisions reduce biases, aligning with Deming’s (1986) principle that “what is not measured cannot be managed.” In food retail, data quality directly impacts profitability (Fávero and Belfiore, 2019). Therefore, integrating internal data (ERP) with external information collected via web scraping constitutes a robust path for evidence-based management (Deloitte, 2022).
The study was conducted in a supermarket chain in São Paulo with over 30 physical stores, 14 of which operate on iFood. The research compares these 14 stores with 14 direct competitors on the same platform. A critical factor was the company’s commercial policy for the digital channel, which establishes a 8% fee on the price of each product. This markup creates a dilemma: passing on the fee affects competitiveness, while absorbing it impacts margins. Before the project, competitor monitoring was manual, an inefficient, time-consuming, error-prone process that did not capture assortment differences, providing a limited view of competitiveness.
To achieve the objectives, a Python algorithm was implemented to automate data collection on iFood and integrate it with the company’s internal databases. The methodology was divided into four components: definition of data sources, automated collection, processing and cross-referencing of information, and calculation of indicators. The developed data pipeline ranges from extraction on iFood to the consolidation of Excel reports for the pricing team. Orchestration tools such as Apache Airflow were considered as an evolution to enable continuous collection routines, aligning with automation trends in retail (NRF, 2023; Apache Software Foundation, 2023).
The project used external and internal data sources. The external source was the iFood marketplace, specifically the product catalogs of competitors selected by the pricing team. The internal sources were extractions from the network’s ERP in Excel format, including: a product table with barcodes (EANs); a merchandising registration table with the hierarchy of each product; a store assortment table; and a table of internal prices and costs.
Automated data collection was performed via web scraping. Each competitor store had a unique ID on iFood. Inspection of the web interface revealed an API endpoint that returned a store’s complete catalog in JSON format when the ID was provided. This discovery allowed for more efficient collection than HTML scraping with BeautifulSoup (Richardson, 2023) or browser automation with Selenium (2023). We opted to consume the API data via HTTP GET requests, using the Requests library in Python (Reitz & Cory, 2023). For each competitor, the data was obtained programmatically, without the need for authentication, as the catalog information is public.
After collection, competitor data was cross-referenced with the company’s internal databases using the EAN code as a key. The competitors’ DataFrame was merged with the ERP’s EAN table, identifying equivalent products. Subsequently, information from the marketing tree was added to allow for segmented analyses. The process included integrating information about which network store was being compared to each competitor and incorporating internal price and cost data. With the unified database, the Competitiveness Index (IC%) was calculated using the formula: IC% = (iFood Network Price / iFood Competitor Price) × 100. Values above 100 indicate that the network is more expensive. The processing was performed with the pandas library (McKinney, 2017), and the result was exported to an Excel file.
The algorithm’s implementation generated actionable results. The most immediate gain was the reduction in time for price research. The manual process consumed about 240 minutes for a limited sample. With automation, complete data collection and report generation were performed in approximately 10 minutes, a time saving of over 95.8%. This efficiency allowed for an increase in update frequency from weekly to daily, aligning the company with best practices in market intelligence (Provost & Fawcett, 2013; McKinsey & Company, 2022).
There was also a substantial expansion in the volume and coverage of data. Instead of dozens of SKUs, the solution began to cover the entire assortment of competitors. The collection of July 21, 2025, resulted in 30,768 unique EANs and 127,410 price observations. This coverage revealed that approximately 28.9% of the products offered by competitors were not part of the network’s assortment in certain stores. This gap opened discussions about the incorporation of new items, benefiting assortment management, as variety is an important decision factor for consumers (APAS, 2022).
The calculation of the Price Index (IC%) provided a quantitative view of price positioning. The overall average IC% was 105.2%, indicating that network prices on iFood were, on average, 5.2% higher than competitors. Segmented analysis revealed significant variations: in categories like rice, the network was competitive (average IC of 88.8%), but in frozen beef, prices were 30.8% higher, a risk of customer loss. Other categories with higher prices included snacks and ready meals (IC 128.4%) and wines (IC 122.0%), while coffee (IC 91.5%) and pasta (IC 93.2%) showed a more aggressive positioning.
The distribution of items by % IC ranges showed that 47% of products were in the “most expensive” range (IC ≥ 1.05), 21% in a “neutral” position (0.98 < IC < 1.05), and 32% “cheaper” (IC ≤ 0.98). This asymmetry showed that the fixed markup policy of 8% was not optimal. Based on this, tactical actions were proposed: for categories with high IC and healthy margins, price reductions were suggested; for those with high IC and tight margins, the recommendation was to renegotiate costs or adjust the assortment. For already competitive items, the guidance was to protect margins and use them in marketing actions.
The assortment analysis revealed that the 28.9% gap was both a threat and an opportunity, prompting discussions about criteria for including new products. The analysis also allowed for the identification of network-exclusive items, which could be promoted as differentiators. Competitive data served as an assortment benchmark, providing input to optimize the balance between depth and breadth, an essential factor for maximizing sales and customer satisfaction (Berman and Evans, 2018).
The accuracy of the data was validated through comparisons with manual collections, with no discrepancies found. The prices captured by the algorithm accurately reflected the values on iFood, reinforcing the reliability of the method (Mitchell, 2018; Provost & Fawcett, 2013). The storage of raw JSON files from each collection contributed to data traceability and auditing, increasing confidence in the results.
Despite the success, limitations were identified. The main one was the absence of EANs in categories such as fruits, vegetables, and greens (FLV) and variable-weight items, which made automatic pairing unfeasible. Another limitation was the absence of automated orchestration of the collection routine, whose execution still depended on manual activation. The implementation of a tool like Apache Airflow was identified as a necessary evolution to ensure continuous data collection.
The results confirmed that the initiative generated concrete gains. The company achieved a reduction in collection costs and time, an increase in the volume of information, and the ability to make more informed and proactive pricing and assortment decisions (Deloitte, 2022; NielsenIQ, 2023). The solution transformed the pricing function from a reactive activity into a strategic competitive intelligence process, a differentiator in the supermarket sector (SA Varejo, 2022; ABRAS, 2023). Decision-making became more assertive, in line with the view that market information is central to marketing strategy (Kotler & Keller, 2012).
This study demonstrated that automating competitor data collection is a viable and high-impact solution for food retail. The initiative addressed the problem of how to monitor competitiveness in the digital channel, reducing collection time by over 95% and expanding coverage to the entire competitor assortment. The practical contribution lies in replacing a manual process with an automated, reliable, and low-cost workflow. Managerially, the Competitiveness Index (IC%) proved to be a clear metric to support strategic adjustments, reinforcing that pricing must balance internal factors and the external competitive environment.
The identified limitations open paths for future work. It is recommended to incorporate product description-based matching methodologies for items without EAN, adopt orchestration tools like Apache Airflow for full automation, and expand the indicators to include metrics such as price elasticity of demand. The developed solution proved to be technically feasible, scalable, and low-cost, confirming the role of market intelligence as a competitive differentiator. It is concluded that the objective was achieved: it was demonstrated that the automation of competitor data collection and analysis enables continuous competitive monitoring and supports more agile and informed pricing decisions in the food retail sector.
References:
ABRAS – Brazilian Supermarkets Association. ABRAS Ranking 2023: pricing as a critical factor for competitiveness. São Paulo: ABRAS, 2023.
APACHE SOFTWARE FOUNDATION. Apache Airflow Documentation. Apache, 2023.
APAS – Paulista Supermarkets Association. APAS Survey 2022: assortment trends and consumer behavior. São Paulo: APAS, 2022.
BERKHOUT, C. Marketing and Sales Strategies in Retail. São Paulo: Alta Books, 2020.
BERMAN, B.; EVANS, J. Retail Management: A Strategic Approach. 13th ed. New Jersey: Pearson, 2018.
DELOITTE. The Future of Retail: trends and automation in global retail. São Paulo: Deloitte, 2022.
DEMING, W. E. Out of the Crisis. Cambridge: MIT Press, 1986.
FÁVERO, L. P.; BELFIORE, P. Statistics Applied to Retail – Volume 1. Rio de Janeiro: Elsevier, 2019.
HARVARD BUSINESS REVIEW BRAZIL. Benchmarking and customer satisfaction in the supermarket sector. São Paulo: HBR Brasil, ed. 5, 2023.
HILLEN, J. Web scraping for food price monitoring: methods, validity, and applications. Journal of Food Research, v. 8, n. 3, p. 45-59, 2019.
KOTLER, P.; KELLER, K. Marketing Management. 14th ed. São Paulo: Pearson, 2012.
McKINNEY, W. Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython. 2nd ed. Sebastopol: O’Reilly Media, 2017.
McKINSEY & COMPANY. Pricing strategies and margin increase in food retail. São Paulo: McKinsey & Company, 2022.
MITCHELL, R. Web Scraping with Python: Collecting Data from the Modern Web. 2nd ed. Sebastopol: O’Reilly Media, 2018.
NAGLE, T.; MÜLLER, G. The Strategy and Tactics of Pricing: a guide to growing more profitably. 6th ed. New York: Routledge, 2018.
NIELSENIQ. Competitiveness and elasticity insights in the supermarket sector. São Paulo: NielsenIQ, 2023.
NRF – National Retail Federation. NRF Big Show Report 2023: global retail trends. New York: NRF, 2023.
PROVOST, F.; FAWCETT, T. Data Science for Business: What You Need to Know about Data Mining and Data-Analytic Thinking. Sebastopol: O’Reilly Media, 2013.
REITZ, K.; CORY, T. Requests: HTTP for Humans – Documentation. Python Software Foundation, 2023.
RICHARDSON, L. Beautiful Soup Documentation. Crummy. com, 2023.
SA VAREJO. Pricing intelligence and competitiveness strategies in Brazilian retail. São Paulo: SA Varejo, 2022.
SELENIUM. Selenium WebDriver Documentation. SeleniumHQ, 2023.
Executive summary from the Final Course Work of the Specialization in Data Science and Analytics of the MBA USP/Esalq
Learn more about the course; click here:
Who edited this article
See Revista E&S first when you search on Google.
Prioritize in my Google results