Add a Document from a URL
Scrape a web page and add it to the knowledge base, using the same chunking/embedding pipeline as uploaded files
The URL is validated synchronously (must be http(s) and resolve to a public IP — private/internal addresses are rejected as an SSRF guard) before a pending document record is created; the actual fetch happens in a background job, and every redirect hop it follows is re-validated against the same guard. Poll Get a Document or List Documents to watch it progress from pending to completed or failed, same as an uploaded file.
Header Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request schema for scraping a URL into the knowledge base.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/knowledge-base/documents/from-url" \ -H "Content-Type: application/json" \ -d '{ "url": "string" }'{ "id": 0, "document_uuid": "string", "filename": "string", "file_size_bytes": 0, "file_hash": "string", "mime_type": "string", "processing_status": "string", "processing_error": "string", "total_chunks": 0, "retrieval_mode": "chunked", "custom_metadata": {}, "docling_metadata": {}, "source_url": "string", "collection_uuid": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "organization_id": 0, "created_by": 0, "is_active": true}