Is there a way to list assets based on metadata, or collections as filter?

I’m developing an app to upload media to social media posting app custom developed for own purpose. Im on V4, is there a way to list files under a collection or search files using more queries , either metadata or other filters?

Hi @musthafa

You can use the search endpoint to filter based on metadata field values.

Here is the documentation for this endpoint: Search account | Frame.io API Documentation

Something to note here is that you can select between lexical and nlp search engines in your request. I’ve included examples requests for each below.


In this example, the text ‘fall photoshoot’ was added to an asset in the Notes metadata field.

curl -X POST https://api.frame.io/v4/accounts/:ACCOUNT_ID/search \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "engine": "lexical",
  "query": "fall photoshoot",
  "filters": {
    "files_and_version_stacks": true,
    "folders": false,
    "projects": false
  }
}'


curl -X POST https://api.frame.io/v4/accounts/:ACCOUNT_ID/search \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "engine": "nlp",
  "query": "all files with Admin in filename",
  "filters": {
    "files_and_version_stacks": true,
    "folders": false,
    "projects": false
  }
}'

If you already know where the files are and just want to list them instead of searching, you can use the List files or List folder children endpoints. Both support include=metadata so you get the assets and their metadata back together.

If you just need a collection’s contents there are also List collections and Show collection endpoints worth checking.

I hope this helps!

I did a search, but the search uses a text based query term. is there a way to search for example:

status = approved? or filetype = mp4/mov etc ?