|Town Size||Population||GP Limit|
Every town has a limit to the type of resources that can be found within its borders. Within the D&D framework, this is called the GP limit. The GP limit is the price for the most expensive item that can be purchased in a settlement of a given size. Usually, the larger the town, the higher the limit… To provide a real-world example: you are much more likely to find a Ferrari dealership in Seattle than you are in Forks.
However, while the game provides a rule for the GP limit based on a settlement’s population, I believe this rule should be flexible.
The GP limit sets the maximum value for items that can be readily found within a settlement of a given size. (i.e. on your shopping trips, you can automatically purchase items from the PHB or DMG that fall below this maximum price1) However, if you wish to purchase an item whose value lies above the GP limit of a given settlement, you may make a search or gather information check to locate a vendor who carries the item. This check will increase in difficulty the further the item lies outside the GP limit of your location.
An example result of a successful check would be that you discover a reclusive wizard who fled the politics of the arcane guilds in the big city to pursue his studies in peace, or you find a retired soldier who was once a great swordsman and is still in possession of his gear.