GitPedia

Ebay node api

eBay API Client for node

From pajaydevยทUpdated May 10, 2026ยทView on GitHubยท

The intent is to simplify the request process by handling the tedious logic. It's a thin wrapper around eBay Api. The project is written primarily in JavaScript, distributed under the MIT License license, first published in 2018. Key topics include: buying-api, dailydeals, deals-api, ebay, ebay-api.

Latest release: 2.9.0โ€” Bug fixes and supporting search items by epid
October 30, 2021View Changelog โ†’

Ebay API Node.js

Ebay API Client for node js.

The intent is to simplify the request process by handling the tedious logic. It's a thin wrapper around eBay Api.

npm version
Downloads
Build Status

Documentation: https://pajaydev.github.io/ebay-node-api

๐Ÿ“’ Table of Contents

Installation

shell
npm install ebay-node-api

Usage

javascript
let eBay = require("ebay-node-api"); let ebay = new eBay({ clientID: "-- Client APP ID ----", env: "SANDBOX", // optional default = 'PRODUCTION' headers: { // optional "X-EBAY-C-MARKETPLACE-ID": "EBAY_GB" // For Great Britain https://www.ebay.co.uk } });

For Country Code and Marketplace id check here

Documentation

Check out the Starter Guide documentation with examples to get started.

Using Express js

You can consume these ebay node api's using Express. You can checkout the sample app in Codesandbox playground.

API details

Without Auth flow

HTTP MethodMethodsDescriptionUsageOffical doc
GETfindItemsByKeywordsSearches for items on eBay by a keyword query.Exampledoc
GETfindCompletedItemsSearches for items whose listings are completed and are no longer available for sale by category (using categoryId), by keywords (using keywords), or a combination of the two.Exampledoc
GETfindItemsByProductSearches for items on eBay using specific eBay product values.Exampledoc
GETfindItemsAdvancedSearches items on eBay by category or keyword or both.Exampledoc
GETgetSingleItemRetrieves publicly visible details about one listing on eBay.Exampledoc
GETgetMultipleItemsRetrieves publicly available data for one or more listings.Exampledoc
GETgetShippingCostsRetrieve estimated shipping cost to ship an active item to a specified destination country and postal code.Exampledoc
GETgetItemStatusGet item status for given item ids.Exampledoc
GETgetUserDetailsGet User Profile.Exampledoc
GETgetDeals(Deprecated)Get details about the deals across eBay.Exampledoc

With Auth flow

HTTP MethodMethodsDescriptionUsageOffical doc
GETsearchItemsSearches for eBay items by various query parameters and retrieves summaries of the items. You can search by keyword, category, eBay product ID (ePID), or GTIN, charity ID, or a combination of these.Exampledoc
GETgetItemRetrieve the complete details of a specific item.Exampledoc
GETgetItemsByItemGroupRetrieve all the individual items in a group.Exampledoc
GETgetItemByLegacyIdReturns the RESTful item ID, which can then be used in any of other Buy API methods.Exampledoc
GETsearchByImageReturns the RESTful item ID, which can then be used in any of other Buy API methods.Exampledoc
GETgetMostWatchedItemsRetrieves data for items with the highest watch counts for the entire site or for a specific category.Exampledoc
GETgetSimilarItemsRetrieves recommended similar items for a specified item.Exampledoc
GETgetItemAspectsForCategoryRetrieve an array of aspects that are appropriate for describing items in a specified category.Exampledoc
GETgetDefaultCategoryTreeIdRetrieve the default category tree reference for a specific eBay marketplace.Exampledoc
GETgetCategoryTreeRetrieve the complete category tree for category id.Exampledoc

Examples

javascript
// findItemsBykeyword ebay .findItemsByKeywords({ keywords: "Garmin nuvi 1300 Automotive GPS Receiver", sortOrder: "PricePlusShippingLowest", //https://developer.ebay.com/devzone/finding/callref/extra/fndcmpltditms.rqst.srtordr.html pageNumber: 2, limit: 10 }) .then( data => { console.log(data); }, error => { console.log(error); } ); // Get Single item listing on eBay ebay.getSingleItem("153265274986").then(data => { console.log(data); }); // Search Items by Keyword ebay.getAccessToken().then(data => { ebay .searchItems({ keyword: "drone", limit: "3" }) .then(data => { console.log(data); // Data is in format of JSON // To check the format of Data, Go to this url (https://developer.ebay.com/api- docs/buy/browse/resources/item_summary/methods/search#w4-w1-w4-SearchforItemsbyKeyword-0) }); }); // perform Advance Search Items by Keyword or category or both // Search Buy It Now ipad items with one day shipping. (https://developer.ebay.com/DevZone/finding/CallRef/findItemsAdvanced.html) ebay .findItemsAdvanced({ entriesPerPage: 2, keywords: "ipad", ExpeditedShippingType: "OneDayShipping", ListingType: "AuctionWithBIN" }) .then( data => { console.log(data); }, error => { console.log(error); } );

More Examples

Test

All test files are present inside test folder. You can run using

javascript
npm run test

Issues:

If you are facing any issues or missing something, you can create the issues here.

๐Ÿ‘ Contribution:

Show your โค๏ธ and support by giving a โญ. Willing to share your idea or ready to contribute, check here

๐Ÿ“ License:

MIT.

Examples:

I have provided the examples here
https://github.com/pajaydev/ebay-node-api/tree/master/demo.

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub โ†’

This article is auto-generated from pajaydev/ebay-node-api via the GitHub API.Last fetched: 6/28/2026