There is often confusion concerning which enchantments will work with specific Minecraft items. Below is a list breaking down individual enchantments that will function with each item subgroup (weapons,tools & armor).
Bow Enchantments
Infinity - ID: 51 - Maximum Level: 1
Flame - ID: 50 - Maximum Level: 1
Punch - ID: 49 - Maximum Level: 2
Power - ID: 48 - Maximum Level: 5
Sword & Axe Enchantments
Looting - ID: 21 - Maximum Level: 3
Fire Aspect - ID: 20 - Maximum Level: 2
Knockback - ID: 19 - Maximum Level: 2
Bane of Arthropods - ID: 18 - Maximum Level: 5
Smite - ID: 17 - Maximum Level: 5
Sharpness - ID: 16 - Maximum Level: 5
Armor Enchantments
Thorns - ID: 7 - Maximum Level: 3 - Chestplate only
Aqua Affinity - ID: 6 - Maximum Level: 1 - Helmet only
Respiration - ID: 5 - Maximum Level: 3 - Helmet only
Feather Falling - ID: 2 - Maximum Level: 4 - Boots only
Projectile Protection - ID: 4 - Maximum Level: 4
Blast Protection - ID: 3 - Maximum Level: 4
Fire Protection - ID: 1 - Maximum Level: 4
Protection - ID: 0 - Maximum Level: 4
Tool Enchantments
Fortune - ID: 35 - Maximum Level: 3
Silk Touch - ID: 33 - Maximum Level: 1
Efficiency - ID: 32 - Maximum Level: 5
Unbreaking - ID: 34 - Maximum Level: 3 - Can also be used on weapons and armor