iDigBio

iDigBio

  • Category: Science


Accessing the iDigBio Search API with JavaScript

iDigBio is an online repository for biological specimen data, providing public access to more than 155 million records. The iDigBio Search API is a publicly available interface for querying this data programmatically. In this post, we will guide you through the process of accessing the iDigBio Search API using JavaScript and provide you with several API example codes.

Requirements

  • You will need a basic understanding of JavaScript to follow this tutorial.
  • You should also have an iDigBio account, as you will need an API key to access the API.

Getting Started

  1. First, navigate to https://github.com/idigbio/idigbio-search-api/wiki.
  2. Review the "Quick Start" guide to understand the overall process of accessing iDigBio data via the Search API.
  3. Scroll down to the "Query Structure" section in the left-hand menu to see the details of what kind of queries you can perform.
  4. Optionally, familiarize yourself with the "Search Filters" section to learn about additional parameters you can use to refine your search queries.

Using JavaScript to Access the API

Once you have an iDigBio login and API key, you can use the following JavaScript code to access the API:

async function search_iDigBio(query) {
  const response = await fetch(`https://search.idigbio.org/v2/search/records?q=${query}&apiKey=${API_KEY}`);
  const data = await response.json();
  return data;
}

In this code, query is the search query parameter and API_KEY is your API key. The function sends a GET request to the iDigBio Search API and returns the JSON response.

Example Query

Below is an example query that searches for records of the bird species "Aix sponsa" occurring in Florida, USA.

const query = [
  `scientificname:"Aix sponsa"`,
  `country:USA`,
  `stateprovince:Florida`
].join(' AND ');

search_iDigBio(query).then(data => {
  console.log(data);
});

This query uses the scientificname, country, and stateprovince search filters to refine the search results.

Conclusion

By following the steps outlined in this post, you now know how to access the iDigBio Search API and perform custom queries using JavaScript. With this knowledge, you can explore the vast amounts of publicly available biological specimen data provided by iDigBio.

Visit to iDigBio website

Similar APIs of Science

Auroras.live DIY

Auroras.live DIY

Science

Friendly way of accessing various aurora hunting data: current space weather conditions, weather, skycams, satellite images, and archived information from the past 15 years.

skystargalaxy

Mercury Retrograde API

Mercury Retrograde API

Science

You may have heard friends say, “Oh, no – Mercury is about to retrograde again!” If you don’t know astrology, you may have wondered what they were talking about. Of all planetary aspects, this one seems to garner the most attention from readers, and it certainly generates the most mail. The reason for their interest is clear – this phenomenon is one of the few that affects everyone in a fairly uniform way, and its effects are always obvious. Once you begin to pay attention to how events in your life change during these phases, you will soon see how important it is to take note of them. Keeping track of Mercury retrograde periods can allow you to increase your productivity and avoid at least some of the frustration they can bring about. This API serves JSON over HTTPs. It allows you to determine whether Mercury is in retrograde for a given date.

mercuryplanetearth

Materials Platform for Data Science

Materials Platform for Data Science

Science

The MPDS application programming interface (API) presents the materials data of the PAULING FILE database online in the machine-readable formats, suitable for automated processing. The intended audience is software engineers and data scientists. The API is available by a subscription (SLA). To start using the API the reader needs a valid API key from the MPDS account. We encourage to contact us for opening such the account.

materialsplateformdata

protocols.io

protocols.io

Science

protocols.io is the #1 open access repository for science methods. The leading platform for data management and protocol sharing. Store, organize, modify, and publish your work all in one place.

biolodychemistryworkflows

SHARE

SHARE

Science

A free, open, dataset about research and scholarly activities. SHARE is a higher education initiative whose mission is to maximize research impact by making research widely accessible, discoverable, and reusable. To fulfill this mission SHARE is building a free, open, data set about research and scholarly activities across their life cycle.

researchstudyscience

Open Science Framework

Open Science Framework

Science

The OSF serves as a repository and archive for study designs, materials, data, manuscripts, or anything else associated with your research during the research process. Every project and file on the OSF has a permanent unique identifier, and every registration (a permanent, time-stamped version of your projects and files) can be assigned a DOI. You can use the OSF to measure your impact by monitoring the traffic to projects and files you make public. With the OSF you have full control of what parts of your research are public and what remains private.

repositoryarchivestudy

Launch Library

Launch Library

Science

Upcoming Space Launches. Provides data like "A batch of 60 satellites for Starlink mega-constellation - SpaceX's project for space-based Internet communication system."

dataspacelaunch

SpaceX

SpaceX

Science

Company, vehicle, launchpad and launch data. Want to know a specific aircrafts launch year, unic code, utc number or local timing? Or interested in rocket technology and curious about the number of enginers in an API? Go ahead. Try the rocket API and much more by SpaceX.

SpaceXTeslaPaypal

CORE

CORE

Science

Access the world's Open Access research papers. A unique and free API providing real-time machine access to metadata and full texts of research papers in CORE. One API for accessing data across all data providers. Perfect for developing and running innovative applications that need global access to research papers.

researchpapersuniversity

USGS Water Services

USGS Water Services

Science

Water quality and level info for rivers and lakes. This site serves USGS water data External Link via automated means using web services External Link and extensible markup language (XML) External Link, as well as other popular media types. Services are invoked with the REST External Link protocol. These services designed for high fault tolerance and very high availability.

waterrainriver