Discover Website URLs
Crawls the provided URL and discovers all linked pages on the same domain. Returns a list of discovered URLs that can then be trained into the knowledge base.
POST
/
knowledge-base
/
{knowledgeBaseId}
/
discover-website
Discover Website URLs
curl --request POST \
--url https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/discover-website \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"url": "https://www.example.com"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://www.example.com'})
};
fetch('https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/discover-website', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/discover-website"
payload = { "url": "https://www.example.com" }
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"urls": [
{
"url": "https://www.example.com/about",
"title": "About Us",
"status": "discovered"
}
],
"totalDiscovered": 24
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 404,
"message": "Not found",
"error": "Not Found"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Authorizations
Path Parameters
Body
application/json
Last modified on March 7, 2026
Was this page helpful?
Discover Website URLs
curl --request POST \
--url https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/discover-website \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"url": "https://www.example.com"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://www.example.com'})
};
fetch('https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/discover-website', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/knowledge-base/{knowledgeBaseId}/discover-website"
payload = { "url": "https://www.example.com" }
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"urls": [
{
"url": "https://www.example.com/about",
"title": "About Us",
"status": "discovered"
}
],
"totalDiscovered": 24
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 404,
"message": "Not found",
"error": "Not Found"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}