Ask HN: How to Retrieve Google Colab JSON Data from a Shared URL via API?

https://news.ycombinator.com/item?id=40311380
by ekusiadadus • 2 years ago
1 0 2 years ago

I want to programmatically obtain the source code of a publicly shared Google Colab notebook through an API. For example, I'm looking to fetch the JSON data of the notebook shared at the following URL:

https://colab.research.google.com/drive/15Ow-hKK3Ky9uwEEljmfQpCYbn02ZLd-F?usp=sharing

When accessing the URL, I receive a temporary response like the one below, which includes details like userPermission and downloadUrl:

Related Stories

Loading related stories...

Source preview

news.ycombinator.com