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
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=offFor a title, author, or general keyword search, use:
https://www.abebooks.com/servlet/SearchResults?kn={query}&sortby=17When 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=offURL-encode each input value.tnis the title filter andanis the author filter.Add optional URL parameters before navigation:
cond=newto restrict results to new copies.destination=US¤cy=USDto calculate shipping for United States delivery in USD.cond=an%20fine%20nf%20vg%20good%20fair%20poor%20unsto include the observed range of used-book conditions; omit it for the site's default condition scope.sortby=17to sort by lowest total price; retain it unless another sort is requested.
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=17for lowest total price on search results. - ISBN searches are directly reachable through
/servlet/SearchResults; keyword searches use the same endpoint with theknparameter. - Separate title and author filters can be supplied with
tnandan; these are useful for narrowing a common title without an extra search interaction. - Result cards are typically
lielements underul#srp-search-results-listwith product IDs. - For destination-aware shipping estimates, use
destination=US¤cy=USD; the site's final URL may not retain these parameters after applying the destination setting. cond=newis the direct condition filter for new copies. Keep multi-conditioncondvalues URL-encoded.- Some result pages may omit shipping or description nodes; the evaluator returns
nullfor absent fields. - The extractor is based on AbeBooks
data-test-idattributes 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"
}