How to download a CRX file from the Chrome web store for a given ID?

Google ChromeGoogle Chrome-ExtensionDownloadChrome Web-Store

Google Chrome Problem Overview


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 encryption

bjclhonkhgkidmlkghlkiffhoikhaajg

into

OgAAADQ_Loe5gfVPF2OUaB35tvex-NKlmA8V4K5YlWuvLCknMH7egLLmnMoFuCZePl_idE1GMf8jZC2KbjQqyyLDoDAAxlKa5eDp-z9frOppHWtQsRU3-iGrrrrA ?

any idea will be helpful.

Google Chrome Solutions


Solution 1 - Google Chrome

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 2 - Google Chrome

There's this website just to do exactly that:

http://chrome-extension-downloader.com/

Solution 3 - Google Chrome

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 4 - Google Chrome

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 - Google Chrome

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

Solution 6 - Google Chrome

This is a lower-tech way of doing it than to use fiddler, and I realize this is three years old now, but I always look to see if someone else has solved the problem. So I found someone did, and I just used their solution several times successfully. Their solution is an extension that can download other extensions, called Give Me CRX:

https://chrome.google.com/webstore/detail/give-me-crx/acpimoebmfjpfnbhjgdgiacjfebmmmci

Solution 7 - Google Chrome

Create a bookmark add the javascript function as the address. Browse to the chrome extension you want to download then click on the bookmark and it should start downloading.

javascript:(function(){
	var pathname = location.pathname;pathArray = pathname.split("/");   
	location = ("http://clients2.google.com/service/update2/crx?response=redirect&x=id"+"%" + "3D" + pathArray[pathArray.length -1]+"%" + "26uc%" + "26lang%" + "3Den-US&prod=chrome"); })();

Thanks

Solution 8 - Google Chrome

Also, I recommend to try this website http://crxextractor.com. Here you can download an extension by it's Chrome Webstore URL and extract it's source code in the browser, no additional software required, and everything get done in a click or two.

Solution 9 - Google Chrome

To download the chrome extension from a given id, you could just use like this

var currentEXTId = 'bjclhonkhgkidmlkghlkiffhoikhaajg';    
let downloadURL = https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D" + currentEXTId + "%26uc&prodversion=32;

The above one is the download URL for the chrome extension. There is also a chrome extension which could help you for downloading chrome extension as zip or crx file.https://chrome.google.com/webstore/detail/crx-extractordownloader/ajkhmmldknmfjnmeedkbkkojgobmljda

Also the code for how its done is available in this Github repo

Solution 10 - Google Chrome

Another way to get the crx file.

  1. Copy the url of the extension, for example: https://chrome.google.com/webstore/detail/tiff-viewer/fciggfkkblggmebjbekbebbcffeacknj?hl=es

  2. In the website http://crxextractor.com/

  3. Click in the option "START FOR FREE".

  4. Paste the url of the extension in the textbox.

  5. Click in the option "DOWNLOAD".

  6. Click in the option "GET .CRX".

Solution 11 - Google Chrome

I made a simple Python script for downloading extensions as CRX files from the Chrome Web Store:

It has no external dependencies and works with either Python 2 or 3.

Thanks to Rob W for the original solution.

Solution 12 - Google Chrome

None of the manually ways in this post works for me so i searched for a URL to download the extension direct. Find this and works perfect for me.

https://clients2.google.com/service/update2/crx?response=redirect&prodversion=49.0&x=id%3D###EXTENSION_ID###%26installsource%3Dondemand%26uc

You must replace ###EXTENSION_ID### with the extension id from the chrome shop. Its part of the URL.

Example Google Translate Extension:

https://clients2.google.com/service/update2/crx?response=redirect&prodversion=49.0&x=id%3Daapbdbdomjkkjkaonfhkkikfgjllcleb%26installsource%3Dondemand%26uc

Solution 13 - Google Chrome

This works for Microsoft Edge Chromium:

https://edge.microsoft.com/extensionwebstorebase/v1/crx?response=redirect&prod=chromiumcrx&prodchannel=&x=id%3D<EXTENSION_ID_HERE>%26installsource%3Dondemand%26uc 

Solution 14 - Google Chrome

You use the https://www.crx4chrome.com/ and search for your extension, it also has a different version of that extension, once you click it download .crx file

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionwong2View Question on Stackoverflow
Solution 1 - Google ChromeRob WView Answer on Stackoverflow
Solution 2 - Google ChromeJohn KentuckyView Answer on Stackoverflow
Solution 3 - Google ChromesergView Answer on Stackoverflow
Solution 4 - Google Chromearulraj.netView Answer on Stackoverflow
Solution 5 - Google ChromeprimeView Answer on Stackoverflow
Solution 6 - Google ChromeBewcView Answer on Stackoverflow
Solution 7 - Google ChromeZalmyView Answer on Stackoverflow
Solution 8 - Google ChromeVladimir IgnatyevView Answer on Stackoverflow
Solution 9 - Google ChromeAshokkumarView Answer on Stackoverflow
Solution 10 - Google ChromeWiicho OrozcoView Answer on Stackoverflow
Solution 11 - Google ChromeszxView Answer on Stackoverflow
Solution 12 - Google ChromeSchmidkoView Answer on Stackoverflow
Solution 13 - Google ChromeДавид МанжулаView Answer on Stackoverflow
Solution 14 - Google ChromeMuhammed ZubairView Answer on Stackoverflow