Search AbeBooks and extract sorted result rows

Site abebooks.comTask abebooks-search-isbn-sorted-resultsVersion v9Updated Aug 6, 2026Category shopping

Search AbeBooks by ISBN or keyword query, optionally filter by condition and US destination, sort results by lowest total price, and extract the first page as structured JSON. This skill was captured from a live agent session on abebooks.com and publishes here verbatim, exactly as an agent receives it.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Purpose

Use AbeBooks marketplace search results to retrieve listings for a supplied ISBN or keyword query, sorted by lowest total price, optionally applying destination, currency, author, title, or condition filters, then extract structured rows.

When to Use

Use this when you need AbeBooks marketplace results for a book identified by ISBN, title, author, or other search terms, with title, seller, price, shipping, condition, and description fields. Apply optional filters when the caller requires a particular condition, destination, currency, title, or author.

Workflow

  1. Build the results URL directly; no homepage visit or search-box interaction is needed.

    For an ISBN, use: https://www.abebooks.com/servlet/SearchResults?bi=0&bx=off&ds=20&isbn={isbn}&prc=USD&recentlyadded=all&rgn=ww&rollup=on&sortby=17&xdesc=off&xpod=off

    For a title, author, or general keyword search, use: https://www.abebooks.com/servlet/SearchResults?kn={query}&sortby=17

    When title and author are separate inputs, use: https://www.abebooks.com/servlet/SearchResults?bi=0&bx=off&ds=20&tn={title}&an={author}&prc=USD&recentlyadded=all&rgn=ww&rollup=on&sortby=17&xdesc=off&xpod=off URL-encode each input value. tn is the title filter and an is the author filter.

  2. Add optional URL parameters before navigation:

    • cond=new to restrict results to new copies.
    • destination=US&currency=USD to calculate shipping for United States delivery in USD.
    • cond=an%20fine%20nf%20vg%20good%20fair%20poor%20uns to include the observed range of used-book conditions; omit it for the site's default condition scope.
    • sortby=17 to sort by lowest total price; retain it unless another sort is requested.
  3. Open the single constructed URL and run this evaluator on the loaded results page:

(() => {
  const clean = (value) => (value || "").replace(/\s+/g, " ").trim();
  const cards = [
    ...document.querySelectorAll('ul#srp-search-results-list > li[id^="product-"]'),
  ].slice(0, 20);
  return {
    heading: clean(
      document.querySelector('h1, [data-test-id="search-results-count"]')?.innerText,
    ),
    count: cards.length,
    rows: cards.map((card) => {
      const titleLink = card.querySelector('a[data-test-id="listing-title-link"]');
      const sellerLink = card.querySelector(
        'a[data-test-id="listing-seller-link"], a[aria-label^="View seller information for"]',
      );
      const priceNode = card.querySelector('[data-test-id^="item-price-"]');
      const shippingNode = card.querySelector(
        '[data-test-id^="item-shipping-price-"]',
      );
      const descriptionNode = card.querySelector('[data-test-id^="description-"]');
      const conditionNode = card.querySelector(
        '[data-test-id^="listing-book-condition-"]',
      );
      const price = clean(priceNode?.innerText);
      const shipping = clean(shippingNode?.innerText);
      return {
        title: clean(titleLink?.innerText) || null,
        link: titleLink?.href || null,
        seller: clean(sellerLink?.innerText) || null,
        price: price || null,
        shipping: shipping || null,
        total: [price, shipping].filter(Boolean).join(" ") || null,
        condition: clean(conditionNode?.innerText) || null,
        description:
          clean(descriptionNode?.innerText || conditionNode?.innerText).slice(
            0,
            220,
          ) || null,
      };
    }),
  };
})();

Site-Specific Gotchas

  • AbeBooks uses sortby=17 for lowest total price on search results.
  • ISBN searches are directly reachable through /servlet/SearchResults; keyword searches use the same endpoint with the kn parameter.
  • Separate title and author filters can be supplied with tn and an; these are useful for narrowing a common title without an extra search interaction.
  • Result cards are typically li elements under ul#srp-search-results-list with product IDs.
  • For destination-aware shipping estimates, use destination=US&currency=USD; the site's final URL may not retain these parameters after applying the destination setting.
  • cond=new is the direct condition filter for new copies. Keep multi-condition cond values URL-encoded.
  • Some result pages may omit shipping or description nodes; the evaluator returns null for absent fields.
  • The extractor is based on AbeBooks data-test-id attributes and the results-list structure; verify selectors if the site redesigns the page.

Expected Output

Return an object containing heading, count, and a rows array. Each row has this shape:

{
  "title": "Book title",
  "link": "https://www.abebooks.com/...",
  "seller": "Seller name",
  "price": "$12.34",
  "shipping": "$4.56 shipping",
  "total": "$12.34 $4.56 shipping",
  "condition": "New",
  "description": "Condition / edition / notes"
}

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=abebooks.com&task=abebooks-search-isbn-sorted-results