Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suspiciouslookingowl/youtubei-gql
https://github.com/suspiciouslookingowl/youtubei-gql
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/suspiciouslookingowl/youtubei-gql
- Owner: SuspiciousLookingOwl
- Created: 2022-07-18T04:11:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-28T19:29:44.000Z (about 2 years ago)
- Last Synced: 2024-05-01T16:20:21.677Z (8 months ago)
- Language: TypeScript
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Youtube GraphQL API
**Note: this app is made for educational purposes**
A Youtube GraphQL API made with [NestJS](https://docs.nestjs.com/graphql) and [Youtubei](https://github.com/SuspiciousLookingOwl/youtubei)
#### [Schema](./src/schema.gql)
#### [Try It Out](https://youtubei-gql.glitch.me/graphql)
## Example
Query
Result```gql
query {
search(keyword: "never gonna give you up", limit: 3) {
items {
... on BaseChannel {
channelId: id
name
}
... on VideoCompact {
videoId: id
title
channel {
name
}
}
... on PlaylistCompact {
playlistId: id
title
channel {
name
}
}
}
}
video(id: "dQw4w9WgXcQ") {
id
title
related(limit: 1) {
items {
id
title
channel {
name
videos(limit: 5) {
items {
id
title
}
}
}
}
}
}
}
``````json
{
"data": {
"search": {
"items": [
{
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"channel": {
"name": "Rick Astley"
}
},
{
"videoId": "34Ig3X59_qA",
"title": "Never Gonna Give You Up - Rick Astley (Lyrics) 🎵",
"channel": {
"name": "DopeLyrics"
}
},
{
"videoId": "LLFhKaqnWwk",
"title": "Rick Astley - Never Gonna Give You Up (Official Animated Video)",
"channel": {
"name": "Rick Astley"
}
}
]
},
"video": {
"id": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
"related": {
"items": [
{
"id": "yPYZpwSpKmA",
"title": "Rick Astley - Together Forever (Official Video) [Remastered in 4K]",
"channel": {
"name": "Rick Astley",
"videos": {
"items": [
{
"id": "LLFhKaqnWwk",
"title": "Rick Astley - Never Gonna Give You Up (Official Animated Video)"
},
{
"id": "rZlQ28OeGMI",
"title": "Rick Astley – My Arms Keep Missing You (Official Audio)"
},
{
"id": "JIOPB36ALMM",
"title": "Rick Astley - abcdefu (GAYLE Cover)"
}
]
}
}
}
]
}
}
}
}
```## Development
Install `pnpm` if you haven't
````
npm i -g pnpm
```
Install dependency
```
pnpm i
```
Start the dev server:
```
pnpm start:dev
```
```
````