Farmers’ markets are a potential strategy to mitigate food insecurity since they can serve fresh food (especially fruits and vegetables) to cities without the complex structure of traditional food supply chains. These markets are part of short supply chains that connect producers directly with clients without intermediaries. However, the planning of this supply strategy has been empirical, sometimes locating markets where they are not necessary. Only a few studies in the literature have analyzed the farmers’ market network design, but they have not considered the market behavior related to the consumers’ preferences. This is the reason for this study. Considering the market environment, we developed a competitive facility location problem to design a network of farmers’ markets. To this goal, we employed a mixed-integer nonlinear programming model. As factors that affect the selection of a seller, we used price, distance, and waiting time to measure the quality of service. Due to its inherent difficulty, we developed a beam search algorithm integrating a greedy randomized component as an approximate solution method compared to the exact solutions of this model. The results present a high-quality algorithm performance with computational times lower and gaps of no more than 2%. This model was applied in a case study in Bogotá, where we found that the most critical factors to increase the demand captured by farmers’ markets are low prices and the maximum number of farmers’ markets to open per week. However, the market share is not larger than 0.5%; hence it is necessary to consider other policies for its working.