动物与宠物

Movebank动物迁徙数据库API

Movebank提供全球动物迁徙和移动轨迹数据的免费访问接口。该API支持查询多种物种的GPS定位数据、环境变量关联信息,并允许研究人员上传和管理自己的追踪数据集。

查看官方文档 ↗

接入教程

1. 访问GitHub查看API文档
2. 注册Movebank账户获取API密钥
3. 使用GET请求查询物种轨迹数据
4. 通过参数过滤时间范围与地理区域
5. 下载JSON格式数据进行分析
6. 可选:上传自有追踪数据至平台

获取动物轨迹数据

python
import requests

url = 'https://api.example.com/movebank/api/studies/123/events'
headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Accept': 'application/json'
}
params = {
    'individual_local_identifiers': 'animal_001',
    'start_date': '2023-01-01',
    'end_date': '2023-01-31'
}
try:
    response = requests.get(url, headers=headers, params=params)
    response.raise_for_status()
    data = response.json()
    print(f'Retrieved {len(data)} movement records')
except requests.exceptions.RequestException as e:
    print(f'Error fetching data: {e}')

查询研究项目元数据

php
<?php
$api_url = 'https://api.example.com/movebank/api/studies';
$api_key = 'YOUR_API_KEY';

$options = [
    'http' => [
        'method' => 'GET',
        'header' => "Authorization: Bearer $api_key\r\n" .
                   "Accept: application/json\r\n"
    ]
];
$context = stream_context_create($options);

$response = file_get_contents($api_url, false, $context);
if ($response !== false) {
    $studies = json_decode($response, true);
    echo 'Available studies: ' . count($studies);
} else {
    echo 'Failed to retrieve studies';
}
?>

获取特定物种的移动事件

javascript
const fetchMovements = async () => {
    const url = 'https://api.example.com/movebank/api/events';
    const params = new URLSearchParams({
        'taxon_id': 'aves',
        'limit': 50,
        'offset': 0
    });
    
    try {
        const response = await fetch(`${url}?${params}`, {
            method: 'GET',
            headers: {
                'Authorization': 'Bearer YOUR_API_KEY',
                'Accept': 'application/json'
            }
        });
        
        if (!response.ok) {
            throw new Error(`HTTP error: ${response.status}`);
        }
        
        const events = await response.json();
        console.log(`Fetched ${events.length} bird movement events`);
        return events;
    } catch (error) {
        console.error('Error fetching movement data:', error);
    }
};

fetchMovements();

常见问题

如何获取API访问权限?

Movebank API目前提供免费访问,但需要注册研究账户并申请API密钥。请访问官方GitHub文档页面查看详细的认证流程和权限申请方法。

API支持哪些数据格式?

Movebank API主要支持JSON格式的数据返回,同时部分端点也提供CSV格式导出功能。所有API响应都遵循标准RESTful设计规范。

数据更新频率是多少?

动物追踪数据的更新频率取决于各个研究项目的上传计划,通常从实时更新到每月更新不等。API文档中会标注每个数据集的更新周期信息。

相似接口推荐

AWS IoT Jobs数据平面

AWS IoT Jobs是一项服务,允许您定义一组作业——这些远程操作将发送到一个或多个连接到AWS IoT的设备上执行。例如,您可以定义作业指示一组设备下载并安装应用程序或固件更新、重启或轮换证书。

待确认
AWS IoT数据平面

AWS IoT数据平面提供物联网设备与AWS云之间的安全双向通信。它实现了消息代理功能,支持应用程序和设备发布消息。该服务适用于传感器、执行器及智能家电等联网设备。

待确认
AWS IoT

AWS IoT 提供物联网设备(如传感器、执行器、嵌入式设备或智能家电)与亚马逊云之间的安全双向通信服务。您可发现自定义的 IoT-Data 端点进行通信,并配置数据转发规则。

待确认
AWS Health API与通知服务

AWS Health API提供对个人健康仪表板中健康信息的编程访问。通过API操作可获取可能影响AWS服务的事件信息,帮助用户监控服务健康状况并及时响应潜在问题。

待确认