Query the parsing result
Updated at:
Query the status, result, or chunks of a parsing task
Call this API to query the status, result, or chunks of a parsing task. Keep polling while data.status is processing; stop when it becomes success or failed.
NoteMake sure you have obtained an API Key before calling. See Authentication.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
biz_id | string | Yes | The business task ID returned by the /parse/submit endpoint. |
step_start | integer | No | The chunk start position; default 0. Corresponds to layouts for document results and segments for audio/video results. |
step_size | integer | No | The chunk step size; default 0 |
oss_config | object | No | OSS output configuration. |
oss_config.access_key_id | string | No | Managed OSS AccessKey ID. |
oss_config.access_key_secret | string | No | Managed OSS AccessKey Secret. |
oss_config.security_token | string | No | Managed OSS Security Token. |
Response
| Field | Type | Description |
|---|---|---|
request_id | string | The request ID. |
data.status | string | Processing status: init, processing, success, or failed. |
data.processing | number | Processing progress. |
data.successful_parsing_num | integer | Number of layouts or segments processed. |
data.image_count | integer | Number of images. |
data.table_count | integer | Number of tables. |
data.paragraph_count | integer | Number of paragraphs. |
data.page_count | integer | Number of pages. |
data.layouts | array | Layout results for the queried chunk. |
data.output_format_result | array | List of output format results. |
data.output_format_result[].output_file_url | string | The URL corresponding to the output type. |
data.output_format_result[].output_type | string | The output type. When the value is markdown, output_file_url is the URL of the parsing result in Markdown format. |
data.media_duration | number | File duration (audio/video). |
data.segments | array | Parsed segment results (audio/video). |
data.synopsis_result | string | Synopsis parsing result (audio/video). |
data.synopsis_segments | array | Synopsis segments (audio/video). |
data.synopsis_summary | string | Synopsis summary (audio/video). |
NoteWhile the status is processing, keep querying this endpoint; when the status is failed, refer to Error codes to determine the cause of failure.
Result query code examples
Document parsing result query
curl -X POST 'https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/parse-x/parse/result' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"biz_id": "parseX-xxx",
"step_start": 0,
"step_size": 1
}'
{
"request_id": "request_xxx",
"data": {
"status": "success",
"processing": 100.0,
"successful_parsing_num": 10,
"image_count": 0,
"table_count": 0,
"paragraph_count": 10,
"page_count": 1,
"layouts": [],
"output_format_result": [
{
"output_file_url": "https://example.com/output/parseX-xxx.md",
"output_type": "markdown"
}
]
}
}
Audio/video parsing result query
curl -X POST 'https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/parse-x/parse/result' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"biz_id": "parseX-Video-xxx",
"step_start": 0,
"step_size": 100
}'
{
"request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"data": {
"status": "success",
"processing": 100.0,
"successful_parsing_num": 59,
"segments": [
{
"start_time": 5120.0,
"file_url": "https://example.com/output/parseX-video-xxx/segments/segment_1_video.mp4",
"audio_frames": [
{
"start_time": 7000.0,
"file_url": "https://example.com/output/parseX-video-xxx/segments/segment_1_audio.mp3",
"ASR_info": "来进来有新座吗?",
"sentences": [
{
"speaker_id": 1,
"end_time": 10380.0,
"begin_time": 7000.0,
"text": "来进来有新座吗?"
}
],
"end_time": 10380.0
}
],
"end_time": 10380.0,
"index": 1,
"uniqueId": "6a00110588ba0646417aa6b3f8d97f76",
"video_frames": [
{
"start_time": 7500.0,
"file_url": "https://example.com/output/parseX-video-xxx/frames/frame_4_0.jpg",
"text_info": "门被打开,一位头戴白色棒球帽、身穿绿色工装马甲的年轻男子满脸笑容地伸手握住敲门者的手,热情地说道“来 进来”",
"end_time": 7566.666666666666
},
{
"start_time": 8400.0,
"file_url": "https://example.com/output/parseX-video-xxx/frames/frame_5_0.jpg",
"text_info": "男子站在采光良好的客厅内,侧身回头并向屋内做出引导的手势,背景中可见书架、玻璃圆桌以及靠窗的蓝色休闲椅",
"end_time": 9266.666666666668
},
{
"start_time": 9933.333333333334,
"file_url": "https://example.com/output/parseX-video-xxx/frames/frame_6_0.jpg",
"text_info": "一个阳光充足的客厅,铺着绿色地毯,左侧有一个装满书的木制书架,角落里放着一把蓝色扶手椅。前景的玻璃咖啡桌上放着一个披萨盒和一本书,墙上挂着一张海报,旁边有一条垂直的绿色装饰带。",
"end_time": 10600.0
}
]
},
...
],
"synopsis_result": "# 视频剧情内容:### 剧情概要\n\n视频....",
"synopsis_segments": [
{
"start_time": 0,
"file_url": "https://example.com/output/parseX-video-xxx/segments/segment_0_video.mp4",
"end_time": 5000,
"index": 0,
"text": "渔夫帽男子在狭长走廊里开始这段vlog,镜头先扫到他深橄榄色T恤、米白色裤子和浅色背包,随后他戴着米色渔夫帽,露出黑色卷发,对着镜头微笑。他说:“今天没事,去看看朋友们都在干什么?”随后他来到一扇带猫眼的深棕色木门前,抬手敲门。",
"uniqueId": "b35998c4077d3e8645e4b198cd920e24"
},
...
],
"synopsis_summary": "视频以一段轻松的朋友探访vlog展开:...."
}
}
Is this page helpful?