Skip to main content

apiverve_animallookup 1.2.7 copy "apiverve_animallookup: ^1.2.7" to clipboard
apiverve_animallookup: ^1.2.7 copied to clipboard

Animal Lookup finds a species by common or scientific name and returns its English names, taxonomy from kingdom to genus and IUCN conservation status. Paid plans add maximum recorded lifespan, adult m [...]

Animal Lookup API - Dart/Flutter Client #

Animal Lookup finds a species by common or scientific name and returns its English names, taxonomy from kingdom to genus and IUCN conservation status. Paid plans add maximum recorded lifespan, adult mass and length, gestation or incubation, litter or clutch size, weaning, sexual maturity, activity cycle, home range and population density. Covers about 8,600 species: over 5,300 mammals plus birds, reptiles, amphibians and fish.

pub package License: MIT

This is the Dart/Flutter client for the Animal Lookup API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_animallookup: ^1.2.7

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_animallookup/apiverve_animallookup.dart';

void main() async {
  final client = AnimallookupClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'name': 'lion',
      'limit': 10
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "query": "lion",
    "totalMatches": 28,
    "count": 3,
    "animals": [
      {
        "commonName": "Lion",
        "scientificName": "Panthera leo",
        "otherNames": [
          "African Lion",
          "Asiatic lion"
        ],
        "taxonomy": {
          "kingdom": "Animalia",
          "phylum": "Chordata",
          "class": "Mammalia",
          "order": "Carnivora",
          "family": "Felidae",
          "genus": "Panthera"
        },
        "conservationStatus": "Vulnerable",
        "conservationCode": "VU",
        "traits": {
          "adultBodyMassKg": 159,
          "adultBodyMassG": 158624,
          "headBodyLengthCm": 184,
          "birthWeightG": 1300,
          "gestationDays": 109,
          "incubationDays": null,
          "litterSize": 3,
          "littersPerYear": 1,
          "clutchSize": null,
          "clutchesPerYear": null,
          "weaningAgeDays": 198,
          "sexualMaturityDays": 1095,
          "diet": "carnivore",
          "activityCycle": "nocturnal",
          "habitatLayer": "ground",
          "homeRangeKm2": 55.2,
          "populationDensityPerKm2": 0.11,
          "socialGroupSize": null,
          "geographicRangeKm2": 11237685
        },
        "lifespan": {
          "maxYears": 28,
          "recordedIn": "captivity",
          "dataQuality": "acceptable"
        },
        "wikidataId": "Q140"
      },
      {
        "commonName": "California sea lion",
        "scientificName": "Zalophus californianus",
        "otherNames": [],
        "taxonomy": {
          "kingdom": "Animalia",
          "phylum": "Chordata",
          "class": "Mammalia",
          "order": "Carnivora",
          "family": "Otariidae",
          "genus": "Zalophus"
        },
        "conservationStatus": "Least Concern",
        "conservationCode": "LC",
        "traits": {
          "adultBodyMassKg": 137,
          "adultBodyMassG": 137195,
          "headBodyLengthCm": 202,
          "birthWeightG": 7000,
          "gestationDays": 259,
          "incubationDays": null,
          "litterSize": 1.2,
          "littersPerYear": 0.5,
          "clutchSize": null,
          "clutchesPerYear": null,
          "weaningAgeDays": 315,
          "sexualMaturityDays": 1095,
          "diet": "omnivore",
          "activityCycle": "mixed",
          "habitatLayer": "ground",
          "homeRangeKm2": null,
          "populationDensityPerKm2": 0.5,
          "socialGroupSize": null,
          "geographicRangeKm2": null
        },
        "lifespan": {
          "maxYears": 35.7,
          "recordedIn": "captivity",
          "dataQuality": "high"
        },
        "wikidataId": "Q379732"
      },
      {
        "commonName": "Southern sea lion",
        "scientificName": "Otaria flavescens",
        "otherNames": [
          "South American sea lion"
        ],
        "taxonomy": {
          "kingdom": "Animalia",
          "phylum": "Chordata",
          "class": "Mammalia",
          "order": "Carnivora",
          "family": "Otariidae",
          "genus": "Otaria"
        },
        "conservationStatus": null,
        "conservationCode": null,
        "traits": {
          "adultBodyMassKg": 194,
          "adultBodyMassG": 193671,
          "headBodyLengthCm": 211,
          "birthWeightG": 12500,
          "gestationDays": 357,
          "incubationDays": null,
          "litterSize": 1,
          "littersPerYear": 1,
          "clutchSize": null,
          "clutchesPerYear": null,
          "weaningAgeDays": 365,
          "sexualMaturityDays": 1461,
          "diet": "omnivore",
          "activityCycle": null,
          "habitatLayer": "ground",
          "homeRangeKm2": null,
          "populationDensityPerKm2": null,
          "socialGroupSize": null,
          "geographicRangeKm2": null
        },
        "lifespan": {
          "maxYears": 29,
          "recordedIn": "captivity",
          "dataQuality": "acceptable"
        },
        "wikidataId": "Q333649"
      }
    ]
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
120
points
98
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Animal Lookup finds a species by common or scientific name and returns its English names, taxonomy from kingdom to genus and IUCN conservation status. Paid plans add maximum recorded lifespan, adult mass and length, gestation or incubation, litter or clutch size, weaning, sexual maturity, activity cycle, home range and population density. Covers about 8,600 species: over 5,300 mammals plus birds, reptiles, amphibians and fish.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_animallookup