1
0
Fork
You've already forked url-loader
0
A simple python server that exposes useful API for LLM
  • Python 86.9%
  • Dockerfile 11.9%
  • Makefile 1.2%
2026年06月05日 16:35:32 +02:00
.woodpecker Fix youtube transcript, add unit test 2026年06月04日 22:48:40 +08:00
app Fix youtube transcript, add unit test 2026年06月04日 22:48:40 +08:00
tests Fix youtube transcript, add unit test 2026年06月04日 22:48:40 +08:00
.cirrus.yml [skip ci] change fingerprint key 2026年02月13日 10:36:57 +08:00
.dockerignore Disable pull base image so that cache can be used 2026年05月28日 22:40:50 +08:00
.gitignore Init 2026年02月06日 20:47:43 +08:00
Dockerfile Remove workdir from dockerfile to avoid cache miss 2026年05月29日 23:34:46 +08:00
Makefile add test command to makefile [skip ci] 2026年06月04日 23:01:29 +08:00
README.md Add readme.md [skip ci] 2026年06月05日 16:35:32 +02:00
requirements.txt Fix youtube transcript, add unit test 2026年06月04日 22:48:40 +08:00

url-loader

A simple Python FastAPI server that exposes useful endpoint for LLM.

Endpoints

Currently, here are the supported endpoints:

  1. POST /loader

Given a list of urls, fetch the contents. Sample request body:

{
 "urls": ["https://example.com"]
}

Sample response body:

[
 {
 "metadata": {
 "title": "Example Domain",
 "source": "https://example.com"
 },
 "page_content": "# Example Domain\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n[Learn more](https://iana.org/domains/example)\n"
 }
]
  1. POST /yt-transcript

Given a list of YouTube URLs, fetch their transcript. Sample request body:

{
 "urls": [
 "https://youtube.com/watch?v=fakeid123"
 ]
}

Sample response body:

[
 {
 "metadata": {
 "title": "Transcript for fakeid123",
 "source": "https://www.youtube.com/watch?v=fakeid123"
 },
 "page_content": "This is a dummy content."
 }
]
  1. POST /sandbox Launch a Python sandbox and run command. This feature requires Docker socket to be exposed. Sample request body:
{
 "code": "print('hello!')"
}

Sample response body:

{
 "stdout": "hello!\n",
 "stderr": "",
 "exit_code": 0
}