how to add website as knowledge base
# support
k
can anyone know how to add website as knowledge base
@User @Vapi Support Bot @Shubham Bajaj
v
I couldn't find enough info to answer your question about adding a website directly as a knowledge base, so I'm escalating this to a human teammate who can help you out! Just in case it's helpful: Vapi lets you upload files (like .txt, .pdf, .docx, etc.) to build a knowledge base via the dashboard or API, but I didn't see anything about adding a website by URL. You can check out more details in the [Knowledge Base docs](https://docs.vapi.ai/knowledge-base). Hang tight—someone from the team will get back to you soon!
To add a website as a knowledge base in Vapi, use Trieve's website crawling feature to create a dataset, then import it into Vapi. After crawling your site in Trieve, create a Vapi knowledge base with this API call (replace placeholders):
Copy code
bash
curl -X POST https://api.vapi.ai/knowledge-base \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-website-kb",
    "provider": "trieve",
    "searchPlan": { "scoreThreshold": 0.2, "searchType": "semantic" },
    "createPlan": { "type": "import", "providerId": "<YOUR_TRIEVE_DATASET_ID>" }
  }'
First, set up and crawl your website in Trieve, then use your Trieve dataset ID in the above request ([details](https://docs.vapi.ai/knowledge-base/integrating-with-trieve)). Sources: - [Integrating with Trieve](https://docs.vapi.ai/knowledge-base/integrating-with-trieve) - [Create Knowledge Base API Reference](https://docs.vapi.ai/api-reference/knowledge-bases/create)
k
Convert website content into supported file formats like PDF or TXT, upload them via the dashboard under “Build > Files,” link them to your assistant, or use Trieve’s website crawler for dynamic ingestion and connect it using Vapi’s BYOD integration..