Illegal - and also horrifically wrong. According to Ol Pejeta:
The demand for great apes as pets, entertainment props, or for display in private zoos in the Middle East is fueling the large scale wild capture of infants in the forests of West Africa and Indonesia. In order to capture young chimpanzees, hunters kill the mothers and often the rest of the troop as well. Many of these infants die en route to their selling destination, as a result of rough handling, cramped transport conditions, stress and dehydration.