Fetching video and photo contents via API

๐Ÿ’ป Environment/Context

  • API

ย 

โ“ Issue/Question

  • Can we get videos as well as pictures via API?

ย 

๐Ÿ‘Œ Resolution/Answer

  • The API returns both photos and videos
    • Each media has a type field set to photo or video
    • Video items also have a video field with the playback and asset reference
  • To fetch only one type, use the media_type filter on the search endpoint (POST /v1/media/search)
    • Set it to photo or video
    • Leave it unset to get both

ย 

๐Ÿ”– Notes