Skip to main content

Animal Lookup API

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.

PyPI version

This is a Python wrapper for the Animal Lookup API


Installation

Using pip:

pip install apiverve-animallookup

Using pip3:

pip3 install apiverve-animallookup

Configuration

Before using the Animal Lookup API client, you have to setup your account and obtain your API Key. You can get it by signing up at https://apiverve.com


Quick Start

Here's a simple example to get you started quickly:

from apiverve_animallookup.apiClient import AnimallookupAPIClient

# Initialize the client with your APIVerve API key
api = AnimallookupAPIClient("[YOUR_API_KEY]")

query = {
    "name": "lion",
    "limit": 10
}

try:
    # Make the API call
    result = api.execute(query)

    # Print the result
    print(result)
except Exception as e:
    print(f"Error: {e}")

Usage

The Animal Lookup API documentation is found here: https://docs.apiverve.com/ref/animallookup. You can find parameters, example responses, and status codes documented here.

Setup

# Import the client module
from apiverve_animallookup.apiClient import AnimallookupAPIClient

# Initialize the client with your APIVerve API key
api = AnimallookupAPIClient("[YOUR_API_KEY]")

Perform Request

Using the API client, you can perform requests to the API.

Define Query
query = {
    "name": "lion",
    "limit": 10
}
Simple Request
# Make a request to the API
result = api.execute(query)

# Print the result
print(result)
Example 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"
      }
    ]
  }
}

Error Handling

The API client provides comprehensive error handling through the AnimallookupAPIClientError exception. Here are some examples:

Basic Error Handling

from apiverve_animallookup.apiClient import AnimallookupAPIClient, AnimallookupAPIClientError

api = AnimallookupAPIClient("[YOUR_API_KEY]")

query = {
    "name": "lion",
    "limit": 10
}

try:
    result = api.execute(query)
    print("Success!")
    print(result)
except AnimallookupAPIClientError as e:
    print(f"API Error: {e.message}")
    if e.status_code:
        print(f"Status Code: {e.status_code}")
    if e.response:
        print(f"Response: {e.response}")

Handling Specific Error Types

from apiverve_animallookup.apiClient import AnimallookupAPIClient, AnimallookupAPIClientError

api = AnimallookupAPIClient("[YOUR_API_KEY]")

query = {
    "name": "lion",
    "limit": 10
}

try:
    result = api.execute(query)

    # Check for successful response
    if result.get('status') == 'success':
        print("Request successful!")
        print(result.get('data'))
    else:
        print(f"API returned an error: {result.get('error')}")

except AnimallookupAPIClientError as e:
    # Handle API client errors
    if e.status_code == 401:
        print("Unauthorized: Invalid API key")
    elif e.status_code == 429:
        print("Rate limit exceeded")
    elif e.status_code >= 500:
        print("Server error - please try again later")
    else:
        print(f"API error: {e.message}")
except Exception as e:
    # Handle unexpected errors
    print(f"Unexpected error: {str(e)}")

The client supports the context manager protocol for automatic resource cleanup:

from apiverve_animallookup.apiClient import AnimallookupAPIClient, AnimallookupAPIClientError

query = {
    "name": "lion",
    "limit": 10
}

# Using context manager ensures proper cleanup
with AnimallookupAPIClient("[YOUR_API_KEY]") as api:
    try:
        result = api.execute(query)
        print(result)
    except AnimallookupAPIClientError as e:
        print(f"Error: {e.message}")
# Session is automatically closed here

Advanced Features

Debug Mode

Enable debug logging to see detailed request and response information:

from apiverve_animallookup.apiClient import AnimallookupAPIClient

# Enable debug mode
api = AnimallookupAPIClient("[YOUR_API_KEY]", debug=True)

query = {
    "name": "lion",
    "limit": 10
}

# Debug information will be printed to console
result = api.execute(query)

Manual Session Management

If you need to manually manage the session lifecycle:

from apiverve_animallookup.apiClient import AnimallookupAPIClient

api = AnimallookupAPIClient("[YOUR_API_KEY]")

query = {
    "name": "lion",
    "limit": 10
}

try:
    result = api.execute(query)
    print(result)
finally:
    # Manually close the session when done
    api.close()

Customer Support

Need any assistance? Get in touch with Customer Support.


Updates

Stay up to date by following @apiverveHQ on Twitter.


All usage of the APIVerve website, API, and services is subject to the APIVerve Terms of Service and all legal documents and agreements.


License

Licensed under the MIT License (MIT)

Copyright (©) 2026 APIVerve, and EvlarSoft LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for apiverve-animallookup 1.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apiverve-animallookup 1.2.7
File Size Uploaded Provenance Actions
apiverve_animallookup-1.2.7.tar.gz 12.0 kB Without provenance Details for apiverve_animallookup-1.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apiverve-animallookup 1.2.7
File Interpreter ABI Platform Actions
apiverve_animallookup-1.2.7-py3-none-any.whl Python 3 none any Details for apiverve_animallookup-1.2.7-py3-none-any.whl

Total release size: 23.5 kB

Release files / apiverve_animallookup-1.2.7.tar.gz

Download URL apiverve_animallookup-1.2.7.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bfeaba174b35bd494ad1fa9754565cff101c94976f116b5805612fac554a844c
BLAKE2b-256 checksum
How to use checksums
9839e77f1954004e24974aab812b909932c65636a7be2e1061381d8fc1d8c662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / apiverve_animallookup-1.2.7-py3-none-any.whl

Download URL apiverve_animallookup-1.2.7-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af138a273f309c2d355423c7f1745996702d4a8fa11ad7153f85d6cd18679fe2
BLAKE2b-256 checksum
How to use checksums
2bbb0e17416a96191b429eb9e2edefcdcbba3ea8344089384d29ab4f63883071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for apiverve-animallookup 1.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page