In the canonical consumer demand problem, an agent makes a decision about quantities to consume, under the assumption that all possible varieties are available and can be accessed at zero cost. Quantities of each budget item are adjusted to achieve maximum utility subject to the budget constraint. As a result, utility and expenditure reflect aggregations of quantity and, implicitly, variety. In reality, the cost of accessing variety may not be zero. In this paper we study the consumer’s choice problem using an endogenous variety approach, allowing variety access cost to influence consumption. We develop a conceptual framework for the problem and test its predictions empirically by comparing patterns of dietary diversity over time among a large sample of urban and rural Chinese consumers. We find that access costs, reflecting differences in infrastructure and household storage technologies, influence dietary diversity.