Wild pokemon have levels of rarity(Common, Uncommon, and Rare) stated next to their names.
Before you are able to successfully capture a wild pokemon, you have to have posted a certain amount of pages. Each rarity has a different amount of pages required. The amount also depends on the kind of pokeball used.
Capture with pokeball:
Common - 3 pages
Uncommon - 4 pages
Rare - 5 pages
Capture with Great Ball:
Common - 2 pages
Uncommon - 3 pages
Rare - 4 pages
Capture with Ultra Ball
Common - 1 page
Uncommon - 2 pages
Rare - 3 pages
Using a Master Ball will always require one page regardless of the rarity of the pokemon.