Search, browse, and download high-quality free photos from Unsplash with filtering, random selection, and detailed photo metadata access.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install unsplash或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install unsplash⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/unsplash/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
Search, browse, and download high-quality free photos from Unsplash's library of millions of images.
mkdir -p ~/.config/unsplash
echo "YOUR_ACCESS_KEY" > ~/.config/unsplash/access_key
chmod 600 ~/.config/unsplash/access_key
Or set environment variable:
export UNSPLASH_ACCESS_KEY="your_access_key_here"
/v1/messages endpoints count; image URLs (images.unsplash.com) don't
curl "https://api.unsplash.com/search/photos?query=nature&per_page=10" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
Parameters:
query: Search terms (required)
page: Page number (default: 1)
per_page: Results per page (default: 10, max: 30)
order_by: relevant (default) or latest
color: Filter by color (black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue)
orientation: landscape, portrait, or squarish
curl "https://api.unsplash.com/photos/random?query=coffee&count=1" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
Parameters:
query: Limit to search term (optional)
count: Number of photos (1-30, default: 1)
orientation: Filter by orientation
collections: Filter by collection IDs (comma-separated)
curl "https://api.unsplash.com/photos/PHOTO_ID" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
Returns full photo metadata including EXIF, location, user info, and all image URLs.
Important: You MUST trigger this endpoint when downloading a photo to comply with API guidelines.
curl "https://api.unsplash.com/photos/PHOTO_ID/download" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
This increments the download counter. Response includes the download URL.
curl "https://api.unsplash.com/photos?per_page=10" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
# List all collections
curl "https://api.unsplash.com/collections?per_page=10" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
# Get collection photos
curl "https://api.unsplash.com/collections/COLLECTION_ID/photos" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
curl "https://api.unsplash.com/users/USERNAME/photos?per_page=10" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
Every photo response includes these URLs:
{
"urls": {
"raw": "https://images.unsplash.com/photo-xxx?ixid=xxx",
"full": "...?ixid=xxx&q=80&fm=jpg",
"regular": "...?ixid=xxx&w=1080&fit=max",
"small": "...?w=400&fit=max",
"thumb": "...?w=200&fit=max"
}
}
Add parameters to any image URL (keep the ixid parameter!):
w=1500: Set width
h=800: Set height
dpr=2: Device pixel ratio
q=75: Quality (1-100)
fm=jpg: Format (jpg, png, webp, avif)
fit=crop: Fit mode (crop, max, clip)
crop=entropy: Crop mode
Example:
https://images.unsplash.com/photo-xxx?ixid=xxx&w=1500&h=1000&fit=crop&q=85
Each photo includes a blur_hash field - a compact string representation for showing blurred placeholders while images load.
{
"blur_hash": "LoC%a7IoIVxZ_NM|M{s:%hRjWAo0"
}
{
"id": "LBI7cgq3pbM",
"created_at": "2016-05-03T11:00:28-04:00",
"width": 5245,
"height": 3497,
"color": "#60544D",
"blur_hash": "LoC%a7IoIVxZ_NM|M{s:%hRjWAo0",
"description": "A man drinking coffee",
"urls": { "raw": "...", "full": "...", "regular": "..." },
"links": {
"download": "...",
"download_location": "https://api.unsplash.com/photos/xxx/download"
},
"user": {
"username": "johndoe",
"name": "John Doe",
"profile_image": { "small": "...", "medium": "...", "large": "..." }
}
}
{
"total": 133,
"total_pages": 7,
"results": [ /* array of photo objects */ ]
}
Always attribute photos to their creators:
Photo by [Name] on Unsplash
Link to photographer's Unsplash profile when possible.
/photos/:id/download before allowing users to download
images.unsplash.com
ixid parameter in URLs
# Store key
export UNSPLASH_ACCESS_KEY="your_key"
# Search
curl "https://api.unsplash.com/search/photos?query=ocean&per_page=5" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
# Random photo
curl "https://api.unsplash.com/photos/random?query=mountains" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
# Get photo
curl "https://api.unsplash.com/photos/PHOTO_ID" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
# Track download (required when downloading!)
curl "https://api.unsplash.com/photos/PHOTO_ID/download" \
-H "Authorization: Client-ID ${UNSPLASH_ACCESS_KEY}"
https://api.unsplash.com
page and per_page parameters
images.unsplash.com don't count against rate limits
ixid parameter when using/manipulating image URLs
black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue
landscape, portrait, squarish
latest, oldest, popular
relevant, latest
401 Unauthorized: Invalid or missing access key
403 Forbidden: Rate limit exceeded or forbidden action
404 Not Found: Photo/user/collection doesn't exist
Check X-Ratelimit-Remaining header to monitor your rate limit status.
安装 Unsplash 后,可以对 AI 说这些话来触发它
Help me get started with Unsplash
Explains what Unsplash does, walks through the setup, and runs a quick demo based on your current project
Use Unsplash to search, browse, and download high-quality free photos from Unsplash...
Invokes Unsplash with the right parameters and returns the result directly in the conversation
What can I do with Unsplash in my data & analytics workflow?
Lists the top use cases for Unsplash, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/unsplash/ 目录(个人级,所有项目可用),或 .claude/skills/unsplash/(项目级)。重启 AI 客户端后,用 /unsplash 主动调用,或让 AI 根据上下文自动发现并使用。
Unsplash 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Unsplash 可免费安装使用。请查阅仓库了解许可证信息。
Search, browse, and download high-quality free photos from Unsplash with filtering, random selection, and detailed photo metadata access.
Unsplash 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using Unsplash
Identifies repetitive steps in your workflow and sets up Unsplash to handle them automatically