×

Our Technical Support team will be out of the office on Wednesday, April 23 starting at 12pm. Tech Support will reopen with normal hours on Thursday, April 24 at 9am. Thank you

Digikey Sort By Price


I'm not the first person to request 'sort-by-price' on Digikey. I have no idea why Digikey would avoid a feature like this (perhaps special agreements with their suppliers?). So if you're like me and often need to find just the cheapest 2 by 1-to-4 mux, here's a quick tutorial to show you how to get sort-by-price on Digikey:

This works with Firefox. There may be options for IE/Chrome/Safari as well but I have not looked.

Step 1 - Install Greasemonkey for Firefox

http://www.sparkfun.com/tutorial/news/Greasemonkey.jpg

Last night this worked great. But of course, this morning greasemonkey seems to have a corruption with the download of their newest version. So I downloaded one of the older versions - worked just fine.

Step 2 - Download the Digikey Sort By Price script by Alex Leone. Just click on the 'digikey_sort_by_price.user.js' link and Firefox will pull it in.

Now hit Digikey and enjoy the sort by price goodness.

http://www.sparkfun.com/tutorial/news/Sortbyprice.jpg


Comments 30 comments

  • For a couple years I’ve been using Digikey’s built in price sort feature. There’s no script to do the work for you (yet), but at least my method uses Digikey’s functions and works instantly across multiple pages, instead of having to download every single page and sort the results.
    The key is inside the source for a results page. For the columns that already can be sorted, you can see a ColumnSort value. Using trial and error, I determined that the correct ColumnSort value for ascending price sort is 1000011. You can construct a request to Digikey’s server and end up with something like this: http://search.digikey.com/scripts/DkSearch/dksus.dll?Selection&Cat=2556317&k=74hc04&ColumnSort=1000011&stock=1
    That URL returns all the in-stock products matching the keyword “74hc04”, sorted ascending by price. You can replace “74hc04” with any desired keyword. I imagine a script to implement this could replace the value of ColumnSort with 1000011 in any search request sent to DigiKey.

    • BAM! Super simple:
      Make a bookmark with the following as the “location”:
      javascript:myForms=document.getElementsByTagName(“form”);myForms[myForms.length-1].ColumnSort.value=1000011;myForms[myForms.length-1].submit();
      Then instead of hitting the “view page” button, just hit that link! Instantly sorted by price! Thanks macetech!!!!!!!

      • Now somebody just needs to write a greasemonkey to add the sort button like the other columns and call that code.

    • This is really interesting! I wish there was some way of making the requests GET requests instead of post so that you could just edit the string and get the new results. I’m working on implementing a simple bookmark which will do searches in the way you just proposed now…

  • Woot - I’m the creator of this script and seeing this on Sparkfun made my day!
    I’ve updated the script so it works natively on Google Chrome: get it at http://userscripts.org/scripts/show/50519 (the cache hasn’t updated on the students.washington.edu webserver).

  • nice script, although the replacing the images with text is a bit ugly. but you can change that back in the script if the mood strikes

  • use mouser.com, their price sort works

  • what about a sparkfun search by price? :p

  • Alex has made a NEW version that has more features…
    you can: kill columns
    add filters
    have multi-tiered filtering
    http://userscripts.org/scripts/show/50519
    Thanks again Alex!

  • It looks as though Digikey has now added this functionality to their search results pages. Quite nice actually, as they also allow for filtering on quantity (to remove the reel pricing).

  • I had always sorted by quantity available. Parts with high quantities are often the cheapest. I will have to try this script out.

  • Ha! Brilliant script.

  • for those who use the the firefox`s digikey search engine, to make this script work just got to Tools ? Greasemonkey ? Manage User Scripts, on Included pages clock on Add and paste this:
    http://www.digikey.com/scripts/DkSearch/dksus.dll*
    @Alex: Very nice job dude!

  • WOW, thanks! especially to the built-in column sort, neat trick! can’t believe I didn’t figure that out earlier! I’ve got it bookmarked!
    Digikey should really thank us. The one biggest reason why I haven’t been buying from digikey is the lack of the price sort–turns out, for us hobbyists, single-unit pricing is important. I’ve always liked DigiKey a bit better than mouser–they tend to have things stocked more often (last few projects, items from mouser went OOS right before I ordered, requiring me to find replacement parts…happens a lot more often than i’d like). Plus, their sort is honestly much better for part parameters–a lot of parts on mouser are not categorized properly. And, they have a much wider selection. Looks like it’s time to switch over to digikey!

  • Thanks, guys!
    Now do you think we could get price included in their search as a parameter?

  • Nate - outstanding tip!
    Thanks!

  • Awesome! For the times I’ve requested this, I’m sure my requests for this feature by now go straight to their junk mail box…
    Should have looked sideways! Darn blinders…

  • There are also the Digikey Fixes scripts at http://consciousanima.net/projects/digikey-enhancements/ that make the page look a bit nicer and can sort price (but only one page at a time).

  • Could it be made to work on the Digi-Key frame in findchips.com or oemstrade.com?

  • Just FYI, this works in Google Chrome too (at least version 4.1.249.1045). :) It’s pretty spiffy to see it auto-grabbing multiple DigiKey result pages and auto-sorting the whole thing. Thanks for the link!

    • unfortunately dosent save your settings (check boxes and max price settings) between sessions

    • (Note: you don’t need greasemonkey in Chrome, you get that for free there. ;)

      • You get GreaseMonkey in FireFox for free as well. It’s just not included as 99% of users don’t know anything about it.

  • This might actually get me to install greasemonkey. Very nice, thanks for the tip!


This Week

This Month

Heartbleed

Happy Arduino Day!