Get species by ID
GET
/api/v1/species/{id}
Gets a species when provided with an ID.
Parameters
Path Parameters
id*
Species ID
Typeinteger
RequiredExample
1234567890
Responses
OK
application/json
JSON
{
"common_name": "Southern Reef Squid",
"id": 1234567890,
"images": [
{
"attribution": "Tiffany Kosch, CC BY-NC-SA 4.0",
"src": "https://inaturalist-open-data.s3.amazonaws.com/photos/340064435/medium.jpg"
}
],
"species": "Sepioteuthis australis"
}
GET
/api/v1/species/{id}
Variables
Key
Value
id*
Samples
cURL
curl https://openfish.appspot.com/api/v1/species/1234567890 \
--header 'Content-Type: application/json'
JavaScript
fetch('https://openfish.appspot.com/api/v1/species/1234567890', {
headers: {
'Content-Type': 'application/json'
}
})
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openfish.appspot.com/api/v1/species/1234567890",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Python
import http.client
conn = http.client.HTTPSConnection("openfish.appspot.com")
headers = { 'Content-Type': "application/json" }
conn.request("GET", "/api/v1/species/1234567890", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))