Find the index endpoint you want to search, and clickSearch Assets.
You will see a list of videos (each corresponding to an asset), as well
as one search bars at the top. You can either click a video to view it,
or begin to search for videos.
To begin searching, enter a text query or upload an image as the search
query.
You will see a list of video clips on the right side of the search result
page, each of which corresponds to a continuous video clip in the
assets.
The video clips are ranked by relevance to the input query.
You can use theFilterssection on the left side of the search result
page to refine your search. Each filter criteria consists of a data
schema key and the annotation value you want to search.
After specifying the filter criteria, clickSearchto
execute the search.
Search Batch Video Warehouse data using the command line
To search the videos (assets) in your
corpus (corpus), populate thesearchIndexEndpointrequest bodywith the content that you would
like to find.
This content comes in a few different formats:
text_queryorimage_query: Query to search with.
Optionalcriteria: Filter criteria on user provided annotations.
In the following example, consider a corpus that contains natural scenery
videos.
To retrieve all assets that are relevant to "sunset at beach" and tagged with
the annotation"state": "California", send the following request:
REST & CMD LINE
Before using any of the request data,
make the following replacements:
REGIONALIZED_ENDPOINT: Endpoint might include a prefix matching theLOCATION_IDsuch
aseurope-west4-. See more aboutregionalized endpoints.
If you have an image of a sunset at a beach, you can also use it as a search query by
sending the following request (input image is in base64 encoding format):
REST & CMD LINE
Before using any of the request data,
make the following replacements:
REGIONALIZED_ENDPOINT: Endpoint might include a prefix matching theLOCATION_IDsuch
aseurope-west4-. See more aboutregionalized endpoints.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Search Batch Video Warehouse data\n\nPrerequisite: create a Batch Video Warehouse with a deployed index.\n\nSearch Batch Video Warehouse data in the console\n------------------------------------------------\n\n### Console\n\n1. Open the **Warehouses** tab of the Vertex AI Vision dashboard.\n\n [Go to the Warehouses tab](https://console.cloud.google.com/ai/vision-ai/media-warehouse)\n2. Find the index endpoint you want to search, and click **Search Assets**.\n\n3. You will see a list of videos (each corresponding to an asset), as well\n as one search bars at the top. You can either click a video to view it,\n or begin to search for videos.\n\n4. To begin searching, enter a text query or upload an image as the search\n query.\n You will see a list of video clips on the right side of the search result\n page, each of which corresponds to a continuous video clip in the\n assets.\n The video clips are ranked by relevance to the input query.\n\n5. You can use the `Filters` section on the left side of the search result\n page to refine your search. Each filter criteria consists of a data\n schema key and the annotation value you want to search.\n After specifying the filter criteria, click **Search** to\n execute the search.\n\nSearch Batch Video Warehouse data using the command line\n--------------------------------------------------------\n\nTo search the videos ([`assets`](/vision-ai/docs/reference/rest/v1/projects.locations.corpora.assets)) in your\ncorpus ([`corpus`](/vision-ai/docs/reference/rest/v1/projects.locations.corpora)), populate the `searchIndexEndpoint`\n[request body](/vision-ai/docs/reference/rest/v1/projects.locations.indexEndpoints/searchIndexEndpoint#request-body) with the content that you would\nlike to find.\nThis content comes in a few different formats:\n\n1. `text_query` or `image_query`: Query to search with.\n2. Optional [`criteria`](/vision-ai/docs/reference/rest/v1/Criteria): Filter criteria on user provided annotations.\n\nIn the following example, consider a corpus that contains natural scenery\nvideos.\nTo retrieve all assets that are relevant to \"sunset at beach\" and tagged with\nthe annotation `\"state\": \"California\"`, send the following request: \n\n### REST \\& CMD LINE\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eREGIONALIZED_ENDPOINT\u003c/var\u003e: Endpoint might include a prefix matching the `LOCATION_ID` such as `europe-west4-`. See more about [regionalized endpoints](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e: Your Google Cloud [project number](/resource-manager/docs/creating-managing-projects#identifying_projects).\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: The [region](/about/locations) where you are using Vertex AI Vision. For example: `us-central1`, `europe-west4`. See [available regions](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003eINDEX_ENDPOINT_ID\u003c/var\u003e: The ID of your target index endpoint.\n\n\nHTTP method and URL:\n\n```\nPOST https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/indexEndpoints/INDEX_ENDPOINT_ID:searchIndexEndpoint\n```\n\n\nRequest JSON body:\n\n```\n{\n \"text_query\": \"sunset at beach\",\n \"criteria\": [\n {\n \"field\": \"state\",\n \"text_array\": {\n \"txt_values\": [\n \"California\"\n ]\n }\n }\n ]\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/indexEndpoints/INDEX_ENDPOINT_ID:searchIndexEndpoint\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/indexEndpoints/INDEX_ENDPOINT_ID:searchIndexEndpoint\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"searchResultItems\": [\n {\n \"asset\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID/assets/ASSET_ID_1\"\n },\n {\n \"asset\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID/assets/ASSET_ID_2\"\n }\n ]\n}\n```\n\n\u003cbr /\u003e\n\nIf you have an image of a sunset at a beach, you can also use it as a search query by\nsending the following request (input image is in base64 encoding format): \n\n### REST \\& CMD LINE\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eREGIONALIZED_ENDPOINT\u003c/var\u003e: Endpoint might include a prefix matching the `LOCATION_ID` such as `europe-west4-`. See more about [regionalized endpoints](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e: Your Google Cloud [project number](/resource-manager/docs/creating-managing-projects#identifying_projects).\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: The [region](/about/locations) where you are using Vertex AI Vision. For example: `us-central1`, `europe-west4`. See [available regions](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003eINDEX_ENDPOINT_ID\u003c/var\u003e: The ID of your target index endpoint.\n\n\nHTTP method and URL:\n\n```\nPOST https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/indexEndpoints/INDEX_ENDPOINT_ID:searchIndexEndpoint\n```\n\n\nRequest JSON body:\n\n```\n{\n \"image_query\": {\n \"input_image\": \"IMAGE_BYTES\"\n },\n \"criteria\": [\n {\n \"field\": \"state\",\n \"text_array\": {\n \"txt_values\": [\n \"California\"\n ]\n }\n }\n ]\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/indexEndpoints/INDEX_ENDPOINT_ID:searchIndexEndpoint\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/indexEndpoints/INDEX_ENDPOINT_ID:searchIndexEndpoint\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"searchResultItems\": [\n {\n \"asset\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID/assets/ASSET_ID_1\"\n },\n {\n \"asset\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID/assets/ASSET_ID_2\"\n }\n ]\n}\n```\n\n\u003cbr /\u003e"]]