Skip to main content

Saved Searches

Save your searches


With saved searches, you can capture your search results at any given point in time, and record the inputs, annotations, search parameters, and models that you are running through the platform.

Saved searches help you to:

  • Save a search so that you can return to those same results later;
  • Share a search with a collaborator in your app;
  • Carve out data that you want to evaluate your models on as a "golden set";
  • Split your data into training sets and test tests.
curl --location --request POST "https://api.clarifai.com/v2/users/YOUR_USER_ID_HERE/apps/YOUR_APP_ID_HERE/searches" \
--header "Content-Type: application/json" \
--header "Authorization: Key YOUR_PAT_HERE" \
--data-raw '{
"searches": [{
"query": {
"ands": [{
"annotation":{
"annotation_info": {
"asset_set": ["set1", "set2"]
}
}
}]
},
"save": true,
"id": "dataset-1589318146",
"name": "Dataset #1589318146"
}]
}'

List Saved Searches in an App

curl --location --request GET "https://api.clarifai.com/v2/users/YOUR_USER_ID_HERE/apps/YOUR_APP_ID_HERE/searches" \
--header "Content-Type: application/json" \
--header "Authorization: Key YOUR_PAT_HERE"

Search by Search ID

curl --location --request POST "https://api.clarifai.com/v2/users/YOUR_USER_ID_HERE/apps/YOUR_APP_ID_HERE/searches/YOUR_SEARCH_ID_HERE" \
--header "Content-Type: application/json" \
--header "Authorization: Key YOUR_PAT_HERE" \
--data-raw '{
"pagination": {
"page": 1,
"per_page": 5
}
}'
note

Saved searches are extremely helpful when testing out multiple versions of a model, or collaborating with a team. Just save your search, and refer to it at any time.