Search code examples
pythonapigoogle-docs

Getting the download link for a public Google Docs file


Reading the Google Docs API I find this:

Downloading

Files cannot be downloaded in a format other than the one in which they were originally uploaded. The download URL for files looks something like this:

https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm12345/YzI2Y2ExYWVm?h=16655626&e=download&gd=true

Given a public Google Documents file URL, say,

https://docs.google.com/open?id=0B1-vl-dPgKm_NTNhZjZkMWMtZjQxOS00MGE1LTg2MjItNGVjYzdmZjYxNmQ5

How can I turn it into a download link?


Solution

  • Hi nightcracker try this:

    https://docs.google.com/uc?export=download&id=DOCIDGOESHERE
    

    I've only tried it with one pdf and it worked ok so maybe having a play with that will help....

    All the best,

    Dave