Okay, I have a bit of time before my next class, so:
The Quick And Dirty Guide to the Minimum Amount of Info You Need to Get a Working Non-Affiliate eBook Link at Amazon & B&N
1) Amazon
They love to put a lot of cruft after the original link, possibly to additionally track how you browse their site.
The minimum you need for a Kindle book is a simple prefix and the ASIN product number for the book.
As an example, here's the typical URL you get via direct search on Amazon for their bestselling freebie,
The Adventures of Sherlock Holmes
Much of it you don't need to reach the book, and you can safely lop off everything but the bolded portion (the trailing slash after the ASIN is useful for telling if you've the full ASIN in there, but not actually required).
Code:
http://www.amazon.com/Adventures-Sherlock-Holmes-ebook/dp/B000JQU1VS/ref=sr_1_1?s=digital-text&ie=UTF8&qid=1317328863&sr=1-1
The UTF8 sets a page encoding so your browser can display accents and special characters. I think the qid tracks your seach session, but I'm not really sure.
In fact, if you came in through some link-obfuscating redirect, you can simply cut and paste the ASIN in the Product Details section on the page, and copy it into a stripped down URL like so:
Code:
http://www.amazon.com/dp/B000JQU1VS/
The link does not need the book title to work at all, as long as you've got the "dp" to indicate that it's a Kindle book and the product ASIN.
Changing the .com to .co.uk or .de will give you an equally valid link for UK & DE Kindlers (provided the Kindle version exists at all in their separate catalogue).
b) B&N
They've got two different types of valid minimal URL.
You will get something which looks like this upon running NookBook Search from their website:
Code:
http://www.barnesandnoble.com/w/complete-sherlock-holmes-volume-i-arthur-conan-doyle/1100318390?ean=9781411431973&itm=1&usri=sherlock%2bholmes%2bbarnes%2bnoble%2bclassics
The itm & ursi stuff at the end is harmless, and I think that B&N just uses it to see what search terms people use to find their books, and hopefully improve the backend.
That page goes to the aggregate all-editions version of the B&N Classics
The Complete Sherlock Holmes, Volume I, of which there are 2 Nook editions listed right below in the formats box below the price.
They go to different URLs for a free and non-free version and look like this:
Code:
(free) http://search.barnesandnoble.com/Complete-Sherlock-Holmes-Volume-I/Arthur-Conan-Doyle/e/2940000952634
Code:
(unfree) http://search.barnesandnoble.com/Complete-Sherlock-Holmes-Volume-I/Arthur-Conan-Doyle/e/9781411431973
Note that the number after the book title and "e" corresponds to the ISBN-13 or BN ID number in the Details section for each book.
You will probably see the BN ID for digital-only editions (or are variants on the paper; this one is part of the special NookStudy College Kick-Start Kit promo) and ISBN-13 for books with a paper edition.
Again, everything after that number is not needed and you can safely delete.
Unfortunately, if you are there via link obfuscator, you can't just cut out any title/author parts of the URL and just leave the ID number for that form of link.
However, B&N also has a number-only variant which you can cut and paste the ID into to get a perfectly clean URL:
Code:
http://search.barnesandnoble.com/booksearch/isbninquiry.asp?EAN=2940000952634
This is the link format you will see if you hover over the book title on the confirmation page if you have just purchased it, or on the digital orders page (it will have some &x=0123456789 stuff after the BN ID, which is not actually necessary but harmless to leave in). You will not actually see it when clicked, because it makes an auto-redirect to the Title/Author/ID format above, but you can easily see if it worked by taking your cut and paste replacement version and seeing if it sends you to the right product page in a new browser window.
A variant form that shows up when your browse your My Nook Library on the website looks like
Code:
http://mynook.barnesandnoble.com/productDetail.html?ean=2940000952634
It will have some "&deliveryID=0123456789" stuff after it which you should probably take off. It's harmless, but may contain info related to the order in your personal account which you might not want floating around.
I don't know if this form of link will fail to show a product page if you don't already own the book.
In summary: To get a clean link for an ebook from Amazon and B&N, all you need is the ASIN or BN ID/ISBN-13 from the Details on the book's own product page and an easily cut and pasted standard website prefix and you should be good to go.
I'll address Sony & Kobo links later, but for now, hope this helps!