import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://zoo-animals-api.p.rapidapi.com/animals/rand/10"))
		.header("X-RapidAPI-Key", "80ed0e7619msh300fdfb6098c24cp160b71jsn6b8d978c56ec")
		.header("X-RapidAPI-Host", "zoo-animals-api.p.rapidapi.com")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
[{"name":"Green Basilisk","latin_name":"Basiliscus plumifrons","animal_type":"Reptile","active_time":"Diurnal","length_min":"2","length_max":"3","weight_min":"0.5","weight_max":"0.6","lifespan":"10","habitat":"Tropical rainforest","diet":"Seeds, fruit, leaves, insects and other small animals","geo_range":"Central America","image_link":"https://upload.wikimedia.org/wikipedia/commons/f/f3/Green_Basilisk%2C_Alajuela%2C_Costa_Rica.jpg","id":80},{"name":"Matamata","latin_name":"Chelus fimbriatus","animal_type":"Reptile","active_time":"Nocturnal","length_min":"1.1","length_max":"1.3","weight_min":"35","weight_max":"38","lifespan":"30","habitat":"Shallow pools and streams","diet":"Fish","geo_range":"Northern South America","image_link":"https://upload.wikimedia.org/wikipedia/commons/7/7f/2009_Chelus_fimbriatus.JPG","id":116},{"name":"Bonobo","latin_name":"Pan paniscus","animal_type":"Mammal","active_time":"Diurnal","length_min":"2.3","length_max":"2.8","weight_min":"68","weight_max":"86","lifespan":"31","habitat":"Tropical forest","diet":"Fruit, seeds, leaves, flowers, fungi, eggs, and small animals","geo_range":"Democratic Republic of the Congo","image_link":"https://upload.wikimedia.org/wikipedia/commons/e/e2/Apeldoorn_Apenheul_zoo_Bonobo.jpg","id":44},{"name":"Timber Rattlesnake","latin_name":"Crotalus horridus","animal_type":"Reptile","active_time":"Nocturnal","length_min":"6","length_max":"6.3","weight_min":"1.1","weight_max":"3.3","lifespan":"20","habitat":"Rocky hillsides, fields, woodlands and swamp","diet":"Small mammals, birds, reptiles and amphibians","geo_range":"Southeastern United States","image_link":"https://upload.wikimedia.org/wikipedia/commons/f/fc/Adult_Crotalus_horridus.jpg","id":175},{"name":"Red River Hog","latin_name":"Potamochoerus porcus","animal_type":"Mammal","active_time":"Diurnal","length_min":"3.5","length_max":"5","weight_min":"100","weight_max":"290","lifespan":"15","habitat":"Rainforest, forest and savanna woodland","diet":"Primarily roots and bulbs, some other plant parts and small animals","geo_range":"Western and central Africa","image_link":"https://upload.wikimedia.org/wikipedia/commons/4/44/Pinselohrschwein_Potamochoerus_porcus_Tierpark_Hellabrunn-5.jpg","id":146},{"name":"Blue-Crowned Motmot","latin_name":"Momotus momota","animal_type":"Bird","active_time":"Diurnal","length_min":"1.1","length_max":"1.3","weight_min":"0.4","weight_max":"0.5","lifespan":"22","habitat":"Rainforest","diet":"Berries, fruits, insects and other small animals","geo_range":"Northern South America","image_link":"https://images.fineartamerica.com/images-medium-large-5/1-trinidad-motmot-blue-crowned-motmot-ken-archer.jpg","id":40},{"name":"White-Handed Gibbon","latin_name":"Hylobates lar","animal_type":"Mammal","active_time":"Diurnal","length_min":"1.42","length_max":"1.92","weight_min":"10","weight_max":"17","lifespan":"16","habitat":"Tropical forest","diet":"Fruits, leaves, insects, and flowers","geo_range":"Southeast Asia","image_link":"https://upload.wikimedia.org/wikipedia/commons/3/38/Hylobates_lar_pair_of_white_and_black_01.jpg","id":190},{"name":"Green and Black Poison Dart Frog","latin_name":"Dendrobatus auratus","animal_type":"Amphibian","active_time":"Diurnal","length_min":"1.5","length_max":"2","weight_min":"0.06","weight_max":"0.065","lifespan":"15","habitat":"Tropical rainforest","diet":"Insects, spiders, and other small invertebrates","geo_range":"Central and South America","image_link":"https://upload.wikimedia.org/wikipedia/commons/e/e2/Green_and_black_poison_dart_frog_at_Slimbridge_Wetland_Centre%2C_Gloucestershire%2C_England_arp.jpg","id":79},{"name":"Horned Puffin","latin_name":"Fratercula corniculata","animal_type":"Bird","active_time":"Diurnal","length_min":"1","length_max":"1.2","weight_min":"0.9","weight_max":"1","lifespan":"20","habitat":"Ocean and rocky coasts","diet":"Fish, mollusks and crustaceans","geo_range":"Bering Sea, Arctic and North Pacific oceans","image_link":"https://upload.wikimedia.org/wikipedia/commons/d/d8/Fratercula_corniculataUSFWSSL0002774.jpg","id":88},{"name":"Coquerel's Sifaka","latin_name":"Propithecus coquereli","animal_type":"Mammal","active_time":"Diurnal","length_min":"1.4","length_max":"1.7","weight_min":"7.5","weight_max":"11","lifespan":"11","habitat":"Forest","diet":"Leaves, fruit, and flowers","geo_range":"Northwestern Madagascar","image_link":"https://upload.wikimedia.org/wikipedia/commons/4/4e/Propithecus_coquereli_02.jpg","id":57}]