{
"urls": [
"https://news.302.ai"
],
"target": "AI大模型及详情介绍",
"schema": {
"topic": {
"type": "string",
"description": "文章主题"
},
"view": {
"type": "number",
"description": "文章浏览量"
},
"detail": {
"type": "string",
"description": "文章详情概要"
},
"keywords": {
"type": "array",
"description": "文章关键词, 最多5个",
"items": {
"type": "string"
}
},
"hot": {
"type": "boolean",
"description": "是否为热门文章, 浏览量超过10"
}
},
"recursiveConfig": {
"matchType": "auto",
"searchModel": "default",
"outputMd": true,
"maxDepth": 1,
"maxUrls": 1
},
"proxyConfig": {
"proxyUrl": "",
"proxyUsername": "",
"proxyPassword": ""
},
"browserConfig": {
"headless": true,
"browserType": "chromium",
"viewportWidth": 1920,
"viewportHeight": 1080,
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"cacheEnabled": false,
"jsEnabled": false,
"lightMode": false,
"textMode": false,
"cookies": [],
"headers": {
"Accept-Language": "zh-CN"
}
}
}
curl --location --request POST 'https://api.302.ai/302/crawler/task' \
--header 'Authorization: Bearer ' \
--header 'Model: gpt-4o-mini' \
--header 'Content-Type: application/json' \
--data-raw '{
"urls": [
"https://news.302.ai"
],
"target": "AI大模型及详情介绍",
"schema": {
"topic": {
"type": "string",
"description": "文章主题"
},
"view": {
"type": "number",
"description": "文章浏览量"
},
"detail": {
"type": "string",
"description": "文章详情概要"
},
"keywords": {
"type": "array",
"description": "文章关键词, 最多5个",
"items": {
"type": "string"
}
},
"hot": {
"type": "boolean",
"description": "是否为热门文章, 浏览量超过10"
}
},
"recursiveConfig": {
"matchType": "auto",
"searchModel": "default",
"outputMd": true,
"maxDepth": 1,
"maxUrls": 1
},
"proxyConfig": {
"proxyUrl": "",
"proxyUsername": "",
"proxyPassword": ""
},
"browserConfig": {
"headless": true,
"browserType": "chromium",
"viewportWidth": 1920,
"viewportHeight": 1080,
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"cacheEnabled": false,
"jsEnabled": false,
"lightMode": false,
"textMode": false,
"cookies": [],
"headers": {
"Accept-Language": "zh-CN"
}
}
}'
{
"taskId": "48c4efe2-f890-4b3a-a595-54fb2ad2623a",
"status": "pending",
"message": "Task started successfully"
}