Web
网页抓取、正文与 Markdown 提取。
Base URL https://api.sniphunter.com
请求与响应中的 $ref 在 OpenAPI 的 components 中定义。
2 个接口
Web
POST/api/v1/web/scrapeWeb Scrape
抓取网页并提取降噪正文(Markdown)。
{
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebScrapeRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}GET/api/v1/web/statusWeb Status
{
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}数据模型
展开 components
{
"schemas": {
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"WebScrapeRequest": {
"properties": {
"url": {
"type": "string",
"minLength": 1,
"title": "Url"
},
"fetch": {
"type": "string",
"enum": [
"auto",
"http",
"browser"
],
"title": "Fetch",
"default": "auto"
},
"pruning_threshold": {
"type": "number",
"maximum": 1.0,
"minimum": 0.0,
"title": "Pruning Threshold",
"default": 0.45
}
},
"type": "object",
"required": [
"url"
],
"title": "WebScrapeRequest"
}
},
"securitySchemes": {
"HTTPBearer": {
"type": "http",
"scheme": "bearer"
}
}
}