Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>Update, 2017</h1> <p>@Leonid commented that he’s found the ASIN <code>BT00LLINKI</code>.</p> <p>Although ASIN’s don’t seem to be strictly incremental, the oldest non-ISBN ASINs do tend to have more zeros than newer ASINs. Perhaps it was inevitable that we’d start seeing ASINs with no zero padding (and then what, I wonder...). So we’re now looking for "B" followed by nine alphanumeric characters (or an ISBN) — unfortunately, the "loss" of that zero makes it a lot easier to get a false positive.</p> <pre><code>/^B[\dA-Z]{9}|\d{9}(X|\d)$/ </code></pre> <hr> <h1>Original answer</h1> <p>In Javascript, I use the following regexp to determine whether a string is plausibly an ASIN:</p> <pre><code>/^\s*(B\d{3}\w{6}|\d{9}(?:X|\d))\s*$/ </code></pre> <p>or, without worrying about extra whitespace or capturing:</p> <pre><code>/^B\d{2}\w{7}|\d{9}(X|\d)$/ </code></pre> <p>As others have mentioned, Amazon hasn't really revealed the spec. In practice I've only seen two possible formats for ASINs, though:</p> <ol> <li>10-digit ISBNs, which are 9 digits + a final character which may be a digit or "X"</li> <li>The letter B followed by two or three digits followed by six or seven alphanumeric characters</li> </ol> <p>If anyone has encountered an ASIN that doesn't fit that pattern, chime in. It may actually be possible to get more restrictive than this, but I'm not certain. Non-ISBN ASINs might only use a subset of alphabetic characters, but even if so, they do use most of them. Some seem to appear more frequently than others, at least (K, Z, Q, W...)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload