Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7893175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:03:53+00:00 2026-06-03T07:03:53+00:00

I am using the code below using FindingAPI of Ebay to get all items

  • 0

I am using the code below using FindingAPI of Ebay to get all items link of Ebay matching a keyword . In this case “gruen watch” is the keyword.
This code doesn’t show more than 100 items link . How can I modify it to show all items link ??

**I have replaced my original appid

Program.cs

namespace ConsoleApplication1
{

class Program
{

    static void Main(string[] args)
    {

        TextWriter tw = new StreamWriter("link.txt");
        using (FindingServicePortTypeClient client = new FindingServicePortTypeClient())
        {

            MessageHeader header = MessageHeader.CreateHeader("My-CustomHeader", "http://www.mycustomheader.com", "Custom Header");
            using (OperationContextScope scope = new OperationContextScope(client.InnerChannel))
            {

                OperationContext.Current.OutgoingMessageHeaders.Add(header);
                HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();
                httpRequestProperty.Headers.Add("X-EBAY-SOA-SECURITY-APPNAME", "MY-APP-ID");
                httpRequestProperty.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "findItemsByKeywords");
                httpRequestProperty.Headers.Add("X-EBAY-SOA-GLOBAL-ID", "EBAY-US");
                OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;


                FindItemsByKeywordsRequest request = new FindItemsByKeywordsRequest();
                request.keywords = "gruen watch";

                PaginationInput pagination = new PaginationInput();
                pagination.entriesPerPageSpecified = true;
                pagination.entriesPerPage = 250;
                pagination.pageNumberSpecified = true;
                pagination.pageNumber = 10;
                request.paginationInput = pagination;




                FindItemsByKeywordsResponse response = client.findItemsByKeywords(request);


                foreach (var item in response.searchResult.item)
                {

                    //Console.WriteLine(item.title);
                    tw.WriteLine(item.viewItemURL.ToString());
                    Console.WriteLine(item.viewItemURL.ToString());

                }


            }

        }

        tw.Close();

        Console.ReadKey();

    }

}

app.config is here

here is the solution I have made :

namespace ConsoleApplication1

{ 



class Program

{



    static void Main(string[] args)

    {



        TextWriter tw = new StreamWriter("1001.txt");

        using (FindingServicePortTypeClient client = new FindingServicePortTypeClient())

        {



            MessageHeader header = MessageHeader.CreateHeader("My-CustomHeader", "http://www.mycustomheader.com", "Custom Header");

            using (OperationContextScope scope = new OperationContextScope(client.InnerChannel))

            {



                OperationContext.Current.OutgoingMessageHeaders.Add(header);

                HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();

                httpRequestProperty.Headers.Add("X-EBAY-SOA-SECURITY-APPNAME", "MYAPPID");

                httpRequestProperty.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "findItemsByKeywords");

                httpRequestProperty.Headers.Add("X-EBAY-SOA-GLOBAL-ID", "EBAY-US");

                OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;





                FindItemsByKeywordsRequest request = new FindItemsByKeywordsRequest();



                request.keywords = "gruen watch";

                FindItemsByKeywordsResponse check = client.findItemsByKeywords(request);

                int totalEntries = check.paginationOutput.totalEntries;

                int cnt = 0;

                int totalPages = (int)Math.Ceiling((double)totalEntries/100.00);



                bool flag = true;



                for (int curPage = 1; curPage <= totalPages; curPage++)

                {

                    PaginationInput pagination = new PaginationInput();



                    pagination.entriesPerPageSpecified = true;

                    pagination.entriesPerPage = 100;

                    pagination.pageNumberSpecified = true;

                    pagination.pageNumber = curPage;

                    request.paginationInput = pagination;



                    FindItemsByKeywordsResponse response = client.findItemsByKeywords(request);





                    foreach (var item in response.searchResult.item)

                    {

                        Console.WriteLine(item.viewItemURL.ToString());

                        tw.WriteLine(item.viewItemURL.ToString());

                    }

                }















            }



        }



        tw.Close();

        Console.WriteLine("end");

        Console.ReadKey();



    }



}



}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:03:55+00:00Added an answer on June 3, 2026 at 7:03 am

    By default, the response returns the first page of data up to a maximum of 100 items. You can change this value with paginationInput.

    On the official eBay documentation for findItemsByKeywords, there is a section entitled Paginating the Results which tells you exactly what you need to know:

    Use paginationInput and its child elements to control which set of items matching the search criteria are returned in the result set. Use paginationInput to divide the returned items into subsets, or “pages,” of data:

    paginationInput.entriesPerPage specifies the maximum number of items
    to return for any given request

    paginationInput.pageNumber specifies
    which “page” of data to return in the current call

    By default, the
    response returns the first page of data up to a maximum of 100 items.
    The following example shows how to return the second page of results,
    with each page containing a maximum of 50 items:

    ...&paginationInput.pageNumber=2&paginationInput.entriesPerPage=50...

    In this example, the response will contain the matching items 51 to 100, assuming there are at least 100 matching items.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the code below I will get all network interfaces which are enabled and
i am using this code below to dynamically capture the name of the button
Hi I'm using this code below to let a user draw their signature on
I'm using code below to get JSON data: [AcceptVerbs(HttpVerbs.Get)] public JsonResult getBranchViaJson() { Json(getBranchList(AppSession.BranchID.Value));
Using the code below in order to get names of my drives: const DWORD
I am using the code below to show only the first 3 items in
Using the code below I can trap an invalid cell entry. In this simple
I am using this code below to swap on image on hover: $(function() {
Using the code below I can't get the image in the web page. I'm
Currently I am using code below and I can get current date to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.