AchLabo

Expertise in Web, Security & AI Engineering

API Integration Mushi-Labe PHP Web Development

Bridging Taxonomy and UX: Automating Scientific Names with the GBIF Global API

Bridging Taxonomy and UX: Automating Scientific Names with the GBIF Global API | AchLabo

Introduction: The Taxonomy Challenge

For many insect collectors, the transition from using “Common Names” (like the Japanese “Oomurasaki”) to “Scientific Names” (Sasakia charonda) is a significant hurdle. A specimen management system must handle both to be user-friendly for beginners yet robust for professionals. To achieve this, I turned to the Global Biodiversity Information Facility (GBIF) API.

What is GBIF?

GBIF is an international network and data infrastructure funded by the world’s governments and aimed at providing anyone, anywhere, open access to data about all types of life on Earth. Their Species API allows developers to search for taxonomic information across millions of records.

Implementing Real-Time Taxonomic Lookup

In “Mushi-Labe,” when a user types a Japanese name, the system queries the GBIF database in the background. This ensures that the generated label follows the International Code of Zoological Nomenclature (ICZN).

API Query Logic

The goal is to find the scientific name, family, and order based on a vernacular (common) name. Here is how the API request is structured in the backend:

// Searching for species info via GBIF
$searchName = "オオムラサキ"; // Example Japanese name
$url = "https://api.gbif.org/v1/species/search?q=" . urlencode($searchName) . "&lang=ja";

$client = \Config\Services::curlrequest();
$response = $client->get($url);
$results = json_decode($response->getBody(), true);

foreach ($results['results'] as $usage) {
    if ($usage['taxonomicStatus'] === 'ACCEPTED') {
        $scientificName = $usage['scientificName'];
        $canonicalName = $usage['canonicalName'];
        $family = $usage['family'] ?? 'Unknown';
        $order = $usage['order'] ?? 'Unknown';
        break;
    }
}

Optimizing UX with Autocomplete

To provide a “Google-like” experience, I implemented an autocomplete frontend. As the user types, the system suggests valid species. This prevents common typos in Latin names—a frequent issue that can ruin the searchability of a physical collection.

The Importance of “Accepted” Names

Taxonomy is constantly evolving. A species might be moved to a different genus, creating “synonyms.” The GBIF API is invaluable here because it identifies the Accepted Name versus synonyms, ensuring the specimen labels remain taxonomically current even as scientific consensus changes.

Final Thoughts: The Future of Citizen Science

Integrating global scientific databases into personal management tools empowers citizen scientists. By making professional-grade taxonomy accessible to everyone, we bridge the gap between hobbyist collecting and formal biodiversity research.