Document HTML API
Get the complete HTML content of documents from the Vysion database. This endpoint provides the full HTML content, unlike the regular document endpoints which return only HTML chunks.
Get Document HTML by ID
Section titled “Get Document HTML by ID”Retrieve the complete HTML content of a specific document by its unique identifier.
GET
/api/v2/html/{id}
Parameters
Section titled “Parameters”Name | Type | Required | Description |
---|---|---|---|
id | string | Yes | Document ID |
Example Requests
Section titled “Example Requests”curl "https://api.vysion.ai/api/v2/html/62bdc0968e4892b70411895c" \ --header 'Accept: application/json' \ --header 'x-api-key: YOUR_API_KEY'
from vysion import client
c = client.Client(api_key="YOUR_API_KEY")result = c.get_document_html("62bdc0968e4892b70411895c")print(result)
Response
Section titled “Response”The endpoint returns the complete HTML content as a string:
"<!DOCTYPE html><html><head><title>Sample Page</title></head><body><h1>Welcome</h1><p>This is the complete HTML content of the document...</p></body></html>"
Use Cases
Section titled “Use Cases”- Full Page Analysis: Get complete HTML structure for comprehensive analysis
- Content Extraction: Extract specific elements from the full document
- Archival: Store complete page content for historical reference
- Research: Analyze complete page structure and embedded elements
Response Status Codes
Section titled “Response Status Codes”Status | Meaning | Description |
---|---|---|
200 | OK | Successful response with HTML content |
401 | Unauthorized | Invalid or missing API key |
404 | Not Found | Document with specified ID not found |
422 | Unprocessable Entity | Validation error |
429 | Too Many Requests | Rate limit exceeded |
Error Responses
Section titled “Error Responses”Document Not Found
Section titled “Document Not Found”{ "error": { "code": 404, "message": "Document not found" }}
Invalid Document ID
Section titled “Invalid Document ID”{ "error": { "code": 422, "message": "Invalid document ID format" }}