Available in VPC
Get the scene search result. After calling the Request scene search, you can use the issued searchId to view the results.
Note
totalCount and results are returned only if status is in the "COMPLETED" status.
- It is sorted by query score, followed by index creation.
Request
This section describes the request format. The method and URI are as follows:
| Method |
URI |
| GET |
/api/v1/workspaces/{workspace_name}/scene-search/{searchId} |
Request headers
For information about the headers common to all Media Intelligence APIs, see Media Intelligence request headers.
Request path parameters
| Field |
Type |
Required |
Description |
workspace_name |
String |
Required |
Workspace name |
searchId |
String |
Required |
Search identifier issued when requesting scene search |
Request query parameters
| Field |
Type |
Required |
Description |
pageSize |
Integer |
Optional |
Number of results per page |
pageNum |
Integer |
Optional |
Page number to query |
Request example
curl --location --request GET 'https://mi.apigw.ntruss.com/api/v1/workspaces/betatest/scene-search/JtWJKTDCKknMHP8Id4Gt?pageSize=50&pageNum=1' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
This section describes the response format.
Response body
result
| Field |
Type |
Required |
Description |
searchId |
String |
Required |
Search identifier issued when requesting scene search |
status |
String |
Required |
Search status codeRUNNING | COMPLETED | FAILEDRUNNING: SearchingCOMPLETED: CompletedFAILED: Failed
|
totalCount |
Integer |
Conditional |
Total number of scenes searched- Included if
status is COMPLETED
|
totalPage |
Integer |
Conditional |
Total page count- Included if
status is COMPLETED
|
pageNo |
Integer |
Conditional |
Current page number- Included if
status is COMPLETED
|
pageSize |
Integer |
Conditional |
Number of results per page- Included if
status is COMPLETED
|
content |
Array |
Conditional |
Scene-level search result list
- Included if
status is COMPLETED
|
result.content
| Field |
Type |
Required |
Description |
jobId |
Integer |
Required |
Search target index (job) ID |
engine |
String |
Required |
Index engine version |
videoAssetId |
Integer |
Required |
Search target video asset ID |
videoAssetName |
String |
Optional |
Video asset name |
scene |
Integer |
Required |
Searched scene ID |
score |
Number |
Optional |
Scene similarity score |
startMs |
Number |
Optional |
Scene start time (millisecond) |
endMs |
Number |
Optional |
Scene end time (millisecond) |
videoUrl |
String |
Optional |
Video playback URL |
sceneThumbnailUrl |
String |
Optional |
Scene thumbnail image URL |
shots |
Array |
Optional |
List of shot information included in the scene |
result.content.shots
result.content.shots.persons
| Field |
Type |
Description |
personId |
Integer |
Person ID |
name |
String |
Person name |
profileUrl |
String |
Person thumbnail image URL |
result.content.shots.scripts
| Field |
Type |
Description |
startMs |
Number |
Dialogue start time (millisecond) |
endMs |
Number |
Dialogue end time (millisecond) |
text |
String |
Dialogue text |
name |
String |
Speaker name- If anonymous, displayed as
Speaker 1, Speaker 2, etc.
|
personId |
Integer |
Speaker person ID |
result.content.shots.queryRef
| Field |
Type |
Description |
queryType |
String |
Query typeTEXT | IMAGE | PERSON | DIALOGUETEXT: Text search resultIMAGE: Image search resultPERSON: Person search resultDIALOGUE: Dialogue search result
|
conditionType |
String |
Query condition |
matchedValues |
Array<String> |
Matching values of the entered query with the corresponding shot |
Response example
{
"code": "0",
"message": "success",
"result": {
"searchId": "JtWJKTDCKknMHP8Id4Gt",
"status": "COMPLETED",
"totalCount": 1,
"totalPage": 1,
"pageNo": 1,
"pageSize": 50,
"content": [
{
"jobId": 12345,
"engine": "v2.1.0",
"videoAssetId": 67890,
"videoAssetName": "Urban chase",
"scene": 7,
"score": 98.3,
"startMs": 120000,
"endMs": 135000,
"videoUrl": "https://kr.object.ncloudstorage.com/.../12345/video.mp4?X-Amz-...",
"sceneThumbnailUrl": "https://kr.object.ncloudstorage.com/.../12345/7.jpg?X-Amz-...",
"shots": [
{
"shot": 70,
"startMs": 121000,
"endMs": 123000,
"score": 98.3,
"persons": [
{
"personId": 1001,
"name": "Jae-suk Yoo",
"profileUrl": "https://kr.object.ncloudstorage.com/.../jiho0.jpg?X-Amz-..."
}
],
"scripts": [
{
"startMs": 121500,
"endMs": 122000,
"text": "This way, come on!",
"name": "Speaker 1",
"personId": null
}
],
"queryRef": [
{
"queryType": "TEXT",
"conditionType": "MUST",
"matchedValues": ["Dark alley"]
}
]
},
{
"shot": 71,
"startMs": 123000,
"endMs": 125000,
"score": 95.8,
"persons": [
{
"personId": 1001,
"name": "Jae-suk Yoo",
"profileUrl": "https://kr.object.ncloudstorage.com/.../jiho0.jpg?X-Amz-..."
}
],
"scripts": [
{
"startMs": 124000,
"endMs": 124500,
"text": "Danger, hide!",
"name": "Speaker 2",
"personId": 1001
}
],
"queryRef": [
{
"queryType": "DIALOGUE",
"conditionType": "ANY",
"matchedValues": ["Danger"]
}
]
}
]
}
]
}
}