https://github.com/gm7avila/fastyoutubeapi
🚧
https://github.com/gm7avila/fastyoutubeapi
fastapi youtube-api
Last synced: about 1 month ago
JSON representation
🚧
- Host: GitHub
- URL: https://github.com/gm7avila/fastyoutubeapi
- Owner: GM7Avila
- Created: 2025-05-05T18:30:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-31T23:26:05.000Z (about 1 year ago)
- Last Synced: 2025-07-03T23:05:07.445Z (12 months ago)
- Topics: fastapi, youtube-api
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastYoutubeAPI
Utilizando FastAPI para interagir com a API do YouTube (teste).
## Requisitos
- Python 3.9 ou superior
## Rodando o projeto
1. crie e ative seu ambiente virtual: `python -m venv venv` + `source venv/bin/activate` no diretório `backend`.
2. instale dependências: `pip install -r requirements.txt`
3. crie e configure o .env com sua chave `YOUTUBE_API_KEY` (consulte a documentação [aqui](https://developers.google.com/youtube/v3/getting-started)) em `application/core/.env`
4. utilize o Makefile com `make run` ou se preferir `uvicorn application.main:app --reload`
5. execute o docker-compose, você pode acessar o pgadmin em: `http://localhost:5050/login?next=/browser/`
6. servidor: [http://127.0.0.1:8000](http://127.0.0.1:8000)
## Endpoints
### 1. GET
#### 1.1. Video Info by Id
- Http Method: `GET`
- Endpoint: `/youtube/video-info/{video_id}`
- Resumo: Retorna informações sobre um vídeo do YouTube. O `video_id` é o identificador único de um vídeo do YouTube.
- Parâmetros: **video_id** (path): O ID do vídeo do YouTube que deseja consultar.
```python
{
"kind": "youtube#videoListResponse",
"etag": "string",
"items": [
{
"kind": "youtube#video",
"etag": "string",
"id": "string",
"snippet": {
"publishedAt": "datetime",
"channelId": "string",
"title": "string",
"description": "string",
"thumbnails": {
"default": {
"url": "string",
"width": 120,
"height": 90
},
"medium": {
"url": "string",
"width": 320,
"height": 180
},
"high": {
"url": "string",
"width": 480,
"height": 360
},
"standard": {
"url": "string",
"width": 640,
"height": 480
}
},
"channelTitle": "string",
"tags": ["string"],
"categoryId": "string",
"liveBroadcastContent": "string",
"localized": {
"title": "string",
"description": "string"
}
}
}
],
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
}
}
```
- Erro: `500`