Saved Searches
With saved searches you can capture your search results at a 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

Create a saved search

cURL
1
curl --location --request POST 'https://api.clarifai.com/v2/searches/' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Key {{key}}' \
4
--data-raw '{
5
"searches": [{
6
"query": {
7
"ands": [{
8
"annotation":{
9
"annotation_info": {
10
"asset_set": ["set1", "set2"]
11
}
12
}
13
}]
14
},
15
"save": true,
16
"id": "dataset-1589318146",
17
"name": "Dataset #1589318146"
18
}]
19
}
20
'
Copied!

List saved searches in an app

cURL
1
curl --location --request GET 'https://api.clarifai.com/v2/searches/' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Key {{key}}'
Copied!

Search by search ID

cURL
1
curl --location --request POST 'https://api.clarifai.com/v2/searches/{{search_id}}' \
2
--header 'Content-Type: application/json' \
3
--header 'Authorization: Key {{key}}' \
4
--data-raw '{
5
"pagination": {
6
"page": 1,
7
"per_page": 5
8
}
9
}'
Copied!
Saved searches are extremely helpful when testing out multiple versions of a model, or collaborating with a team. Just save your search, and refer back to it any time.
Last modified 1yr ago