eBay

search-listings

ebay.com
InstallationInstalls just this skill for your agent
Side effectread
Authnone
Needsnavigate · evaluate
Summary

Search eBay listings by keyword, returning title, price, condition and item link.

Params
{"query":"string (search text)"}
Returns
{"count":"int","query":"string","results":"array of { itemId, title, url, price, condition, shipping }"}
SKILL.md41 lines

Intent

Search eBay listings by keyword. Navigates the search results page and reads the rendered item cards in the browser. Param: query (search text). Returns {count, results:[{itemId, title, url, price, condition, shipping}]}. Price is whatever currency eBay shows for the session's region. Read-only, it never bids or buys. Note: eBay may show an interstitial error page to a cold session; if the result is empty, navigate to https://www.ebay.com first and retry.

Execute

  1. navigate → https://www.ebay.com/sch/i.html?_nkw={{query|encode}}&_sacat=0
  2. evaluate the Extractor below with params. It does the in-page work and returns the JSON in returns.

Extractor

( async (root, params) => { const doc = root && root.querySelectorAll ? root : document; const txt = (el) => el ? (el.innerText || el.textContent || '').trim() : null; const clean = (s) => (s || '').replace(/\sOpens in a new window or tab\s$/i, '').replace(/^New Listing/i, '').trim(); const items = Array.from(doc.querySelectorAll('ul.srp-results li.s-item, li.s-card')); const seen = new Set(); const results = items.map((c) => { const title = clean(txt(c.querySelector('.s-item__title, .s-card__title, [role="heading"] span, .s-item__title span'))); if (!title || /^Shop on eBay$/i.test(title)) return null; const linkEl = c.querySelector('a.s-item__link, a[href*="/itm/"]'); let url = linkEl ? (linkEl.getAttribute('href') || '').split('?')[0] : null; const idM = url ? url.match(//itm/(\d+)/) : null; const itemId = idM ? idM[1] : null; if (url && itemId) { if (seen.has(itemId)) return null; seen.add(itemId); } return { itemId, title, url: itemId ? ('https://www.ebay.com/itm/' + itemId) : url, price: txt(c.querySelector('.s-item__price, .s-card__price')) || null, condition: txt(c.querySelector('.s-item__subtitle, .SECONDARY_INFO')) || null, shipping: txt(c.querySelector('.s-item__shipping, .s-item__logisticsCost')) || null }; }).filter(Boolean); return { count: results.length, query: String((params && params.query) || ''), results }; } )

Success assertion

{
  "expr": "typeof result === 'object' && Array.isArray(result.results)",
  "type": "value"
}
search-listings: a eBay skill for AI browsing agents · browser-memory