Search eBay listings
TL;DR
About
The job it does best is pricing something before you list it. Say a Canon AE-1 Program turned up in a drawer: search "canon ae-1 program body" and you get the active listings eBay shows for it, each with price, shipping cost and seller feedback. Add shippingCost to price for a rough landed cost before tax (shippingCost is null when a card has no delivery line). Then drop anything marked "for parts" or bundled with a lens, and send the closest body-only matches to get_listing for condition and photos. The catch is that nothing here has sold yet. A Buy It Now price is what a seller hopes to get and an auction bid will probably still climb, so check the buying-format line in attributes before trusting a number. Keywords are the only input, with no condition or price filter. Items eBay tacks on as "matching fewer words" go to relatedResults, kept apart from the real matches.
Input
query requiredSearch keywords, e.g. "vintage camera"
Output
query requiredresults requiredListings eBay returned as matches for the query.
returned optionalHow many matching listings this page yielded, excluding the loosely-related ones.
relatedResults optionalListings eBay appended when the query ran out of matches. They are not results for the query and are kept apart so they cannot be mistaken for matches; usually empty.
resultCountText optionaleBay's own count heading, verbatim ("130,000+ results for vintage camera"). Compare it with `returned`: it is the site's total for the query, while the script reads one page.
Example output
Shape only: placeholder values generated from the output schema, not a real run.
{
"query": "…",
"results": [
{
"price": 3.5,
"title": "Example",
"itemId": "abc123",
"currency": "…",
"attributes": [
"…"
],
"shippingCost": 3.5,
"sellerFeedbackCount": 3,
"sellerFeedbackPercent": 3.5
}
],
"returned": 3,
"relatedResults": [
{
"price": 3.5,
"title": "Example",
"itemId": "abc123",
"currency": "…",
"attributes": [
"…"
],
"shippingCost": 3.5,
"sellerFeedbackCount": 3,
"sellerFeedbackPercent": 3.5
}
],
"resultCountText": "…"
}