This study explores the integration of market structure learning into pricing strategies to maximize revenue in e-commerce and retail environments. We consider the problem of determining the revenue maximizing price of a single product in a market of heterogeneous consumers segmented by their product valuations; and analyze the pricing strategies for varying levels of prior market structure knowledge. The proposed mechanisms utilize customer preference data, and adopt a two-stage approach: an offline learning stage that focuses on learning market structure, including the number of segments and their sizes and valuations, and an online learning stage that prioritizes revenue maximization and iteratively updates these estimates to refine pricing strategies dynamically. Experimental results demonstrate the effectiveness of these methods in adapting to different levels of market knowledge, revealing the economic value of learning market structure in achieving near-optimal revenues. Our findings suggest that even with limited prior market knowledge, firms can benefit from incremental learning strategies to reach profit levels that are relatively close to those achieved in full-information scenarios.