> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://next.developer.frame.io/platform/v2/api-reference/assets/library-search-post/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://next.developer.frame.io/_mcp/server. # Advanced search for Assets POST https://api.frame.io/v2/search/library Content-Type: application/json Search using ElasticSearch key/value pairs Reference: https://next.developer.frame.io/platform/v2/api-reference/assets/library-search-get ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Body (application/json) This endpoint expects a LibrarySearch. - `account_id` (string, optional) - `filter` (LibrarySearchFilter, optional) — Custom ES filters to apply to your query - `include_deleted` (boolean, optional) — Flag to include soft-deleted records in results - `opts` (LibrarySearchOpts, optional) — Additional request options - `page` (integer, optional) — The page to retrieve - `page_size` (integer, optional) — The number of results to include in the page - `q` (string, optional) — Search text - `query` (string, optional) — Search text - `sort` (string, optional) — Sorting parameters ## Response ### 200 Assets success response - `list of Asset` ## Errors ### 401 Unauthorized Error Unauthorized response - `code` (integer, optional) - `errors` (list of HttpErrorErrorsItems, optional) - `message` (string, optional) ## Types ### LibrarySearchFilter Custom ES filters to apply to your query ### LibrarySearchOpts Additional request options ### Asset Accepts arbitrary key/value pairs for storing information on an asset ### HttpErrorErrorsItems - `code` (integer, optional) - `detail` (string, optional) - `status` (integer, optional) - `title` (string, optional) ### Asset0 - `` (string, optional) ## Examples **Request** ```json {} ``` **Response** ```json [ { "account_id": "a3f1c9e2-4b7d-4f8a-9c3e-2d5f7b6a9e1c", "archive_from": "2024-01-15T09:30:00Z", "archive_scheduled_at": "2024-01-15T09:30:00Z", "archive_status": "pending", "archived_at": "2024-01-15T09:30:00Z", "asset_type": "document", "bundle": false, "bundle_view": "default", "cover_asset_id": "b7d9f8a3-1c4e-4a7b-9c3e-2d5f7b6a9e1d", "creator": { "_type": "user", "account_id": "a3f1c9e2-4b7d-4f8a-9c3e-2d5f7b6a9e1c", "avatar_color": "#4A90E2", "digest_frequency": "weekly", "email": "jane.doe@example.com", "first_login_at": "2022-05-15T09:00:00Z", "from_adobe": false, "from_google": true, "highest_account_role": "admin", "id": "user-1234abcd-5678-efgh-9012-ijklmnopqrst", "image_128": "https://cdn.frame.io/images/users/128/user123.png", "image_256": "https://cdn.frame.io/images/users/256/user123.png", "image_32": "https://cdn.frame.io/images/users/32/user123.png", "image_64": "https://cdn.frame.io/images/users/64/user123.png", "inserted_at": "2022-05-15T09:00:00Z", "integrations": [ "slack", "dropbox" ], "joined_via": "email_invite", "last_seen": "2024-04-12T16:45:00Z", "mfa_enforced_at": "2023-11-01T08:00:00Z", "name": "Jane Doe", "next_digest_date": "2024-04-17T08:00:00Z", "profile_image": "https://cdn.frame.io/images/users/profile/user123.png", "roles": { "admin": true, "id": "role-5678abcd-1234-efgh-9012-ijklmnopqrst", "sales": false, "service_desk": false, "support": true }, "timezone_value": "America/New_York", "updated_at": "2024-04-10T12:00:00Z", "upload_url": "https://upload.frame.io/user123", "user_default_color": "#FF5733", "user_hash": "abc123def456ghi789" }, "frames": 2400, "hard_deleted_at": "2024-02-14T09:30:00Z", "id": "asset-9f8a7b6c-5d4e-3f2a-1b0c-9d8e7f6a5b4c", "index": 12.5, "is_bundle_child": false, "is_hls_required": true, "is_session_watermarked": false, "item_count": 15, "label": "approved", "metadata": {}, "metadata_flags": { "id": "meta-1234abcd-5678-efgh-9012-ijklmnopqrst", "is_360": false, "is_hdr": true, "is_original_player_compatible": true }, "name": "Project Proposal Document.pdf", "original": "https://cdn.frame.io/assets/originals/project-proposal.pdf", "parent_asset_id": "folder-1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6", "project_id": "project-1234abcd-5678-efgh-9012-ijklmnopqrst", "properties": { "": "Confidential" }, "required_transcodes": { "cover": true, "finalized": [ "thumb", "image_full", "h264_720" ], "h264_1080_best": true, "h264_2160": false, "h264_360": true, "h264_540": true, "h264_720": true, "image_full": true, "image_high": true, "page_proxy": true, "thumb": true, "thumb_540": false, "thumb_orig_ar_540": false, "thumb_scrub": true }, "team_id": "team-9876zyxw-vuts-rqpo-nmlk-jihgfedcba09", "type": "file", "user_permissions": { "can_download": true, "can_modify_template": false, "can_public_share_presentation": true, "can_public_share_review_link": true, "can_share_downloadable_presentation": false, "can_share_downloadable_review_link": true, "can_share_unwatermarked_presentation": false, "can_share_unwatermarked_review_link": true }, "view_count": 152 } ] ``` **SDK Code** ```python import requests url = "https://api.frame.io/v2/search/library" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.frame.io/v2/search/library'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/search/library" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.frame.io/v2/search/library") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.frame.io/v2/search/library") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.frame.io/v2/search/library', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.frame.io/v2/search/library"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/search/library")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```