Flickr
Flickr 服务
- 认证方式
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- 分类
- 摄影
简介
Flickr API 搜索和管理照片——公开照片搜索只需 API 密钥,用户数据需要 OAuth。它是网上最古老的照片 API 之一。
注(2026-08 实测):无效密钥返回 HTTP 200 带
jsonFlickrApi({"stat":"fail","code":100,...})(JSONP 包装 + 业务错误)——不是 4xx。请检查响应里的stat。
快速开始
照片搜索(替换 YOUR_KEY):
curl "https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=YOUR_KEY&text=cat&format=json&nojsoncallback=1"
{
"stat": "ok",
"photos": { "total": 12345, "photo": [ { "id": "123", "secret": "abc", "server": "66", "farm": 66, "title": "A cat" } ] }
}
照片 URL 模式:
https://farm{farm}.staticflickr.com/{server}/{id}_{secret}.jpg
认证方式
- API 密钥:在 flickr.com 注册 → 创建应用 → 密钥(公开读取)。
- 用户级访问(上传、私密照片)用 OAuth 1.0a。
api_key作为查询参数发送;检查响应里的stat: "ok"(错误以 HTTP 200 返回,已实测)。
速率限制与注意事项
- 免费 API 密钥:约 3,600 次请求/小时(看文档);OAuth 增加用户令牌。
- REST 端点是
https://www.flickr.com/services/rest/?method=...。 - 用
format=json&nojsoncallback=1获取干净 JSON(默认 JSONP 包装是jsonFlickrApi(...))。
常见问题
Flickr API 免费吗? 是的——免费 API 密钥带小时限额。
为什么 200 但 stat fail?
Flickr 在 JSONP 信封里用 HTTP 200 返回错误(已实测)——请检查 stat。
如何拼照片 URL?
https://farm{farm}.staticflickr.com/{server}/{id}_{secret}.jpg。
摄影 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| Bruzu Image generation with query string | API Key | Yes | Yes | ↗ |
| CheetahO Photo optimization and resize | API Key | Yes | Unknown | ↗ |
| Dagpi Image manipulation and processing | API Key | Yes | Unknown | ↗ |
| Duply Generate, Edit, Scale and Manage Images and Videos Smarter & Faster | API Key | Yes | Yes | ↗ |
| DynaPictures Generate Hundreds of Personalized Images in Minutes | API Key | Yes | Yes | ↗ |