Hi all!
We’ve just added the /search endpoint to the experimental API! This endpoint calls the same search engines that power the search bar in the Frame.io web app. In fact, you can even choose which engine to run your search with.
We see this endpoint being incredibly useful for a lot of integrations and workflows, and would love to get some feedback on how it’s working for you. For feedback on quality of search results, we can route those to our search team if necessary – but we’d love to see feedback on the endpoint itself.
Getting Started
It’s incredibly simple to set up. All you need to do is choose your search engine (lexical for standard search or nlp for natural language/semantic search) and pass your search query. The endpoint will search across the specified account and return a list of matches.
data: {
"engine": "nlp",
"query": "YOUR SEARCH QUERY"
}
If you’d like you can also filter by asset type:
data: {
"engine": "nlp",
"query": "YOUR SEARCH QUERY",
"filters":
{
"files_and_version_stacks": "true",
"folders": "false",
"projects": "false"
}
Advanced Workflows
You can even use the nlp engine to search against more specific parameters by using a tokenized query string. Let’s say your workflow needs to find assets based on filename, limited to a project, and with a specific Status value.
//Capture these from the user
filename = "my_file.mov"
project = "{project_id}"
status = "In Progress"
query_string = "{filename} in project {project_id} with Status {status}"
data: {
"engine": "nlp",
"query": query_string,
"filters":
{
"files_and_version_stacks": "true",
"folders": "false",
"projects": "false"
}