Search code examples
ebay-api

eBay API - How to get all comments on a seller?


Hello fellow developers,

I am trying to use eBay API to get ALL the comments on a specific seller. I Successfully got the comments by using the GetUserProfile API call from the Shopping API, with FeedbackDetails includeSelector. My problem is that this way i can get just 5 recent comments. I need ALL the comments, or at least somehow specify a number e.g 200 recent comments.

Here is my JavaScript code:

function _cb_getComments(root) {
   . . .
}  // End _cb_getComments() function

// Construct the request
var url = "http://open.api.ebay.com/shopping?";
url += "callname=GetUserProfile&";
url += "responseencoding=JSON&";
url += "appid=" + appID + "&";
url += "siteid=0&";
url += "version=525&";
url += "UserID=" + sellerName + "&";
url += "IncludeSelector=FeedbackDetails&";
url += "callback=true&";
url += "callbackname=_cb_getComments";

// Submit the request
s=document.createElement('script');
s.src = url;
document.body.appendChild(s);

appID and sellerName are variables set at the beginning of the .js file. This works and returns only 5 comments.

Any suggestions?


Solution

  • You'll need to use the Trading API call GetFeedback.

    If you haven't used the eBay Trading API before, you'll need to learn a little bit more about how to make calls, since you can't use GET/REST, and instead need to POST your requests, along with a user token (such as your own).