获取网页内容
接口说明
地域:仅支持华北 2(北京)与新加坡地域。
费用:公测期间可免费使用,暂不收取相关费用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
dtsai:WebFetch |
none |
*全部资源
|
无 |
|
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-beijing |
| Url |
string |
是 |
待抓取的目标网页 URL 地址。 |
https://xxx/projects/spring-boot |
| OutputFormat |
string |
否 |
输出格式。取值:
|
markdown |
| AgentName |
string |
否 |
代理名称 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
A30D0930-xxxx-xxxx-xxxx-C2C661CC8B58 |
| Success |
boolean |
请求是否成功。 |
true |
| HttpStatusCode |
integer |
HTTP 状态码。 |
200 |
| ErrorCode |
string |
错误码。 |
ErrorMessage Code |
| ErrorMessage |
string |
错误信息。 |
ErrorMessage Example |
| Url |
string |
网页 URL 地址。 |
https://xxxx/projects/spring-boot |
| UrlType |
string |
URL 分类结果。取值:
|
static_html |
| ContentFormat |
string |
实际输出格式。取值:
|
markdown |
| Title |
string |
网页标题。 |
Spring Boot |
| Content |
string |
网页内容。 |
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications. |
示例
正常返回示例
JSON格式
{
"RequestId": "A30D0930-xxxx-xxxx-xxxx-C2C661CC8B58",
"Success": true,
"HttpStatusCode": 200,
"ErrorCode": "ErrorMessage Code",
"ErrorMessage": "ErrorMessage Example",
"Url": "https://xxxx/projects/spring-boot",
"UrlType": "static_html",
"ContentFormat": "markdown",
"Title": "Spring Boot",
"Content": "Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications."
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。