Crickets are kept as pets and are considered good luck in some countries; in China, they are sometimes kept in cages or in hollowed-out gourds specially created in novel shapes. The practice was common in Japan for thousands of years; it peaked in the 19th century, though crickets are still sold at pet shops. It is also common to have them as caged pets in some European countries, particularly in the Iberian Peninsula. Cricket fighting is a traditional Chinese pastime that dates back to the Tang dynasty (618–907). Originally an indulgence of emperors, cricket fighting later became popular among commoners. The dominance and fighting ability of males does not depend on strength alone; it has been found that they become more aggressive after certain pre-fight experiences such as isolation, or when defending a refuge. Crickets forced to fly for a short while will afterwards fight for two to three times longer than they otherwise would.
Captive crickets are omnivorous; when deprived of their natural diet, they accept a wide range of organic foodstuffs. Some species are completely herbivorous, feeding on flowers, fruit, and leaves, with ground-based species consuming seedlings, grasses, pieces of leaf, and the shoots of young plants. Others are more predatory and include in their diet invertebrate eggs, larvae, pupae, moulting insects, scale insects, and aphids. Many are scavengers and consume various organic remains, decaying plants, seedlings, and fungi. In captivity, many species have been successfully reared on a diet of ground, commercial dry dog food, supplemented with lettuce and aphids.