How to download a CRX file from the Chrome web store for a given ID?
Solution 1
For one of my extensions I had to download other CRXs automatically knowing only extension ID. I solved this by opening the following URL:
http://clients2.google.com/service/update2/crx?response=redirect&x=id%3D<EXTENSION_ID_HERE>%26uc%26lang%3Den-US&prod=chrome
this page will forward you to that https://clients2.googleusercontent.com/crx/download/
address.
I don't remember already how I came up with that URL (it was either in page source somewhere or I used network sniffer), but it has been working great for me since last December, so it looks reliable.
Solution 2
The CRX file itself can be directly downloaded from
https://clients2.google.com/service/update2/crx?response=redirect&prodversion=[PRODVERSION]&acceptformat=crx2,crx3&x=id%3D[EXTENSIONID]%26uc
- [PRODVERSION] is the version of Chrome, which must be 31.0.1609.0 at the very least, and
- [EXTENSIONID] is the ID of the extension
(New in 2018) acceptformat=crx2,crx3
instructs the server to also respond with extensions in the CRX3 format (instead of 204 No Content when the extension is not available as CRX2).
If the extension you're using contains OS-specific modules (e.g. NaCl), then you have to add additional parameters (os
, arch
, nacl_arch
).
For the full logic of generating a complete CRX download URL, see the get_crx_url
function in https://github.com/Rob--W/crxviewer/blob/master/src/cws_pattern.js.
This is a part of the Chrome Extension Source Viewer extension, available in the Chrome Web Store: https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
Note that opening the previous URL in Chrome will not trigger a download because Chrome automatically intercepts responses whose Content-Type
is set to application/x-chrome-extension
. If you want to programatically download the crx file in a Chrome extension, change the MIME-type to application/octet-stream
(e.g. as done in src/lib/crx-to-zip.js
).
Solution 3
There's this website just to do exactly that:
http://chrome-extension-downloader.com/
Solution 4
I wrote a small python script to automate that process what @serg @Rob W
https://gist.github.com/arulrajnet/2424bc1ffc40324f3786
you can use that also.
python ChromeAppDownloader.py -u https://chrome.google.com/webstore/detail/google-maps/lneaknkopdijkpnocmklfnjbeapigfbh
This is how you have to use.
Solution 5
You can use the below URL template,
https://clients2.google.com/service/update2/crx?response=redirect&prodversion=[PRODVERSION]&x=id%3D[EXTENSIONID]%26uc
The PRODVERSION is the Chrome version. (get it from settings -> Help -> About Google Chrome).
Ex : Version 69.0.3497.100
(Official Build) (64-bit)
The EXTENSIONID is the id for the extension.
Ex : Here is a sample plugin, https://chrome.google.com/webstore/detail/jetbrains-ide-support/hmhgeddbohgjknpmjagkdomcpobmllji?hl=en the id is hmhgeddbohgjknpmjagkdomcpobmllji
So sample request to download will be https://clients2.google.com/service/update2/crx?response=redirect&prodversion=69.0.3497.100&x=id%3Dhmhgeddbohgjknpmjagkdomcpobmllji%26uc
Comments
-
wong2 almost 3 years
I'd like to download the .crx file of an extension from webstore, I use fiddler to analyze the network request when I install an extension from webstore and got it.
For example, for the extension: https://chrome.google.com/webstore/detail/bjclhonkhgkidmlkghlkiffhoikhaajg
the download link is:https://clients2.googleusercontent.com/crx/download/OgAAADQ_Loe5gfVPF2OUaB35tvex-NKlmA8V4K5YlWuvLCknMH7egLLmnMoFuCZePl_idE1GMf8jZC2KbjQqyyLDoDAAxlKa5eDp-z9frOppHWtQsRU3-iGrrrrA/extension_1_7_11.crx
Now I'm wondering if there is a universal method for get .crx of an extension, the problem is how did Google encryptionbjclhonkhgkidmlkghlkiffhoikhaajg
into
OgAAADQ_Loe5gfVPF2OUaB35tvex-NKlmA8V4K5YlWuvLCknMH7egLLmnMoFuCZePl_idE1GMf8jZC2KbjQqyyLDoDAAxlKa5eDp-z9frOppHWtQsRU3-iGrrrrA
?any idea will be helpful.
-
wong2 over 12 yearsOh you are the developer of "Extension Gallery and Web Store Inspector"? thanks very much!
-
neocotic over 12 yearsThis will work perfectly for an install link on my website. Thanks a lot! It's worth noting that you get the warning notification when using this URL. Is this the same when using it within an extension?
-
user2012801 over 12 years@Alasdair Warning is probably displayed when you are trying to install in, not just download.
-
Rob W over 10 yearsNote: Some extensions contain NaCl modules, that require additional query string parameters. See the source code of my crxviewer extension for the composition of the URL: github.com/Rob--W/crxviewer/commit/…
-
craastad over 10 yearsChrome threw a fit while trying to open this url, if you are on windows, then open it in IE to download it with no problem.
-
Rob W over 10 years@craastad Because Chrome recognizes the file as an extension. Install the Chrome extension source viewer extension to easily access the extension's source code in Chrome/Opera.
-
Rob W about 10 years@adardesign Have you tried it? This does not even work, for two reasons: 1. Use
location.pathname
instead oflocation.href
. If the URL contains?lang=en
, then this snippet will fail. 2. Chrome will not "start downloading", but ask you to install the extension. -
Dwarf about 10 yearsYou are right, I was just trying to answer this question with the following gist, but then I saw this answer, where the same idea was put into a bookmarklet.. and no I didn't try it. See gist.. gist.github.com/adardesign/c0dff591556b90fefcc5
-
Matthew Gertner almost 10 yearsIt seems like Google has changed something recently and this approach no longer works (it returns 204). Anyone have any idea what changed? The author of chrome-extension-downloader.com appears to have fixed it but hasn't updated the documentation.
-
neyl almost 10 yearsThe long URL provided in the question still works, though. So back to square one!
-
törzsmókus over 9 years...except you can never know for sure that you download the same code from their site that you wanted.
-
Alf Eaton about 9 years
location.href = 'http://clients2.google.com/service/update2/crx?response=redirect&prodversion=42&x=' + encodeURIComponent('uc&id=' + location.pathname.split('/').pop());
-
törzsmókus almost 9 years@inf3rno how do you know? just because a downloaded extension ‘works’ for you, it might also steal your data or kill your kittens in the background. that’s why you should only download from Google servers, unless you can check the integrity of the crx file (e.g. by a checksum)
-
inf3rno almost 9 years@törzsmókus I checked the code in the crx file, that's how I know. Ofc. there is no guarantee that this downloader is always safe.
-
Dan Dascalescu over 8 yearsNo longer works. I get
204 No Content
. Even after replacing%3D
with=
and%26
with&
. -
i336_ over 8 yearsConfirming that this URL no longer works, I get
204 No Content
too. See the answer mentioning PRODVERSION, that one works. -
damio about 8 yearsHere's the one I use that works for native and non-native extensions:
https://clients2.google.com/service/update2/crx?response=redirect&os=linux&arch=x86-64&nacl_arch=x86-64&prod=chromiumcrx&prodchannel=unknown&prodversion=49.0.2623.108&x=id%3D{ID}%26uc
with{ID}
being the extension id. -
goat almost 8 yearsthis workes for me
javascript:(function(){ location.href = 'https://clients2.google.com/service/update2/crx?response=redirect&prodversion=38.0&x=' + encodeURIComponent('id=' + location.pathname.split('/').pop() + '%26installsource%3Dondemand%26uc'); })();
-
echo about 6 yearsChrome blocks the download without giving me a option to keep the file other than the discard button. How to work around this?
-
Keenan almost 6 yearsI know this answer is a bit old, but while this site is still alive - it attempts to load third party scripts. Do be aware before using it.
-
Zoe stands with Ukraine about 5 yearsPlease don't just post some tool or library as an answer. At least demonstrate how it solves the problem in the answer itself.
-
BBerastegui almost 4 yearsGod bless you, internet stranger. This works at the time of this comment. The older url that I had was working only for some urls, but not all. This one solved it :D
-
Ashley almost 4 yearsThis can be used to install Themes in Microsoft Edge (Chromium) without having to trust a third-party website or extension to acquire the CRX for you; just punch the URL as specified directly into the address bar and Edge does the rest.
-
Andy about 3 yearsThat last one doesn't seem to work either
-
Luke Miles over 2 yearsMy version:
javascript:window.location.href=%22https://clients2.google.com/service/update2/crx?response=redirect&prodversion=95&acceptformat=crx2,crx3&x=id%253D%22+window.location.href.split(%27/%27).at(-1).split(%27?%27)[0]+%22%2526uc%22
using auto-escape -
user674669 over 2 yearsExample URL that worked for me: clients2.google.com/service/update2/…
-
nightcoder almost 2 yearsMy Avira antivirus blocked access to this site, be careful.