Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we retrieve more info from https://release-youtubei.sandbox.googleapis.com? #817

Closed
4 tasks done
ldenoue opened this issue Nov 22, 2024 · 5 comments
Closed
4 tasks done
Labels
question Further information is requested

Comments

@ldenoue
Copy link

ldenoue commented Nov 22, 2024

Question

In #748 you show how to request data from a client using https://release-youtubei.sandbox.googleapis.com/youtubei/v1/player

But what other APIs does this provide besides player/

Other details

No response

Checklist

  • I am running the latest version.
  • I checked the documentation and found no answer.
  • I have searched the existing issues and made sure this is not a duplicate.
  • I have provided sufficient information.
@ldenoue ldenoue added the question Further information is requested label Nov 22, 2024
@LuanRT
Copy link
Owner

LuanRT commented Nov 22, 2024

It's the same API with the same endpoints, therefore it can do the same things. The only difference is that it is under a different domain.

@LuanRT LuanRT closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
@rustynail1984
Copy link

It's the same API with the same endpoints, therefore it can do the same things. The only difference is that it is under a different domain.

There is one more difference in this domain. This dont have a CORS restriction and can be used in Browser for client side requests.

@LuanRT
Copy link
Owner

LuanRT commented Nov 23, 2024

Yes I am aware, this is one of the domains they use for staging and testing. I'm not sure how reliable it is though.

@ldenoue
Copy link
Author

ldenoue commented Nov 23, 2024

This particular endpoint returns only some video details.
Is there an endpoint that returns the list of captions? these are urls with timedtext in them.

@ldenoue
Copy link
Author

ldenoue commented Nov 24, 2024

I found this StackOverflow comment really useful:
https://stackoverflow.com/a/68492807/1158671

curl 'https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8' -H 'Content-Type: application/json' --data '{  "context": {    "client": {      "hl": "en",      "clientName": "WEB",      "clientVersion": "2.20210721.00.00",      "clientFormFactor": "UNKNOWN_FORM_FACTOR",   "clientScreen": "WATCH",      "mainAppWebInfo": {        "graftUrl": "/watch?v=UF8uR6Z6KLc",           }    },    "user": {      "lockedSafetyMode": false    },    "request": {      "useSsl": true,      "internalExperimentFlags": [],      "consistencyTokenJars": []    }  },  "videoId": "UF8uR6Z6KLc",  "playbackContext": {    "contentPlaybackContext": {        "vis": 0,      "splay": false,      "autoCaptionsDefaultOn": false,      "autonavState": "STATE_NONE",      "html5Preference": "HTML5_PREF_WANTS",      "lactMilliseconds": "-1"    }  },  "racyCheckOk": false,  "contentCheckOk": false}'

If you use https://release-youtubei.sandbox.googleapis.com/youtubei/v1/player instead and omit the key, it:

  • returns the full JSON payload with captions
  • can be called from a browser environment (no CORS issues).

Laurent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants