Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

Unsplash Photo Search

https://api.sandbase.ai/v1/api/unsplash/search-photos

Search Unsplash for free stock photos by keyword. Returns image URLs in several sizes, dimensions, alt text, the photographer's name and profile, and the photo's Unsplash page.

Preço
A partir de $0.0033USD / chamada
Método
POST
Resposta
JSON
Parâmetros
1 obrigatórios · 4 opcionais

Playground

Entrada
Keyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace".
Only return photos with this dominant color tone. Omit for any color.
120
Maximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less. Intervalo: 1 a 20.
Order results by best match (relevant, the default) or newest first (recent).
Only return photos with this orientation. Omit for any orientation.
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da API

Unsplash Photo Search API

Search Unsplash for free stock photos by keyword. Returns image URLs in several sizes, dimensions, alt text, the photographer's name and profile, and the photo's Unsplash page.

Request

curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "unsplash/search-photos", "limit": 2, "query": "coffee"}'

The result is returned in outputs[0].data. Lookups that find nothing fail with a not-found error.

Parameters

NameTypeRequiredDescription
querystringYesKeyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace".
colorstringNoOnly return photos with this dominant color tone. Omit for any color. One of: black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue.
limitintegerNoMaximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less.
orientationstringNoOnly return photos with this orientation. Omit for any orientation. One of: landscape, portrait, square.
sortBystringNoOrder results by best match (relevant, the default) or newest first (recent). One of: relevant, recent.

Pricing

Billed at the actual cost of each call: about $0.00165 per result returned, up to $0.0336 per request (about $0.0033 for the request above). A call can cost more when the first data source fails and another one answers. Failed calls and lookups that find nothing are not charged.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
UnsplashA partir de $0.0033 por chamadaJSON

Perguntas

FAQ

Como eu uso a API Unsplash Photo Search?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/unsplash/search-photos com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API Unsplash Photo Search?

A partir de $0.0033 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API Unsplash Photo Search aceita?

Obrigatórios: query (string). Opcionais: color (um de black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, blue), limit (integer), sortBy (um de relevant, recent) e orientation (um de landscape, portrait, square). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API Unsplash Photo Search retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona).

Preciso de uma conta de desenvolvedor Unsplash ou de uma chave de API?

Não. Unsplash Photo Search funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Unsplash separadamente.