POST
/
{guru_slug}
/
data-sources
curl --request POST \
  --url https://api.gurubase.io/api/v1/{guru_slug}/data-sources/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "youtube_urls": [
    "<string>"
  ],
  "website_urls": [
    "<string>"
  ]
}'
[
    {
        "type": "YouTube",
        "url": "https://youtu.be/gAkwW2tuIqE",
        "status": "success",
        "id": 3275,
        "title": null
    },
    {
        "type": "YouTube",
        "url": "https://youtu.be/AhZ3YStdaQs",
        "status": "exists",
        "id": 3274,
        "title": null
    },
    {
        "type": "Website",
        "url": "https://kubernetes.io/docs/home/",
        "status": "success",
        "id": 3276,
        "title": null
    },
    {
        "type": "Website",
        "url": "https://kubernetes.io/docs/concepts/",
        "status": "exists",
        "id": 3269,
        "title": null
    }
]

Add new data sources (YouTube videos and websites) to your Guru. The processing is asynchronous. Check the status of the data sources with the Get Data Sources endpoint.

PDF files should be uploaded directly through the Gurubase platform interface. We will add support for uploading PDFs via the API in the future.

Path Parameters

guru_slug
string
required

The slug of the Guru to add data sources to

Body Parameters

youtube_urls
string[]

Array of YouTube video URLs to process

website_urls
string[]

Array of website URLs to index

Response

The response is an array of processed data sources.

type
string

Type of data source (Website, YouTube)

url
string

URL of the data source

status
string

Processing status (e.g., “exists”, “success”)

id
number

Unique identifier for the data source

title
string

Title of the data source (can be null)

[
    {
        "type": "YouTube",
        "url": "https://youtu.be/gAkwW2tuIqE",
        "status": "success",
        "id": 3275,
        "title": null
    },
    {
        "type": "YouTube",
        "url": "https://youtu.be/AhZ3YStdaQs",
        "status": "exists",
        "id": 3274,
        "title": null
    },
    {
        "type": "Website",
        "url": "https://kubernetes.io/docs/home/",
        "status": "success",
        "id": 3276,
        "title": null
    },
    {
        "type": "Website",
        "url": "https://kubernetes.io/docs/concepts/",
        "status": "exists",
        "id": 3269,
        "title": null
    }
]