Skip to content

Stock Search

Stock Search queries configured external providers (Unsplash, Pexels, Pixabay) and lets you import a result into your Library with one click.

Endpoints

GET  /api/v1/search-media-online/available-sources    list enabled providers
POST /api/v1/search-media-online                      run a search

Configuration

Providers are toggled on a per-instance basis under Admin → OAuth Credentials (the online-media-search page). Each provider needs its API key configured before it appears in available-sources.

Search request

json
{
  "query": "cats",
  "source": "unsplash",
  "page": 1,
  "perPage": 20,
  "type": "photo"
}

Importing a result

Selecting a result calls POST /api/v1/files/download with the provider's hosted URL. Sosyabot fetches the asset, persists it via the same path as a normal upload, and returns the new file ID.