Join Free
+ Reply to Thread
Results 1 to 4 of 4
  1. #1

    Question Paged API request not returning full results


    I've been trying to query the coupons API for all coupon codes. I understand there is a query limit of 1000 per page, however when adding &page=2 to the query string, it returns no coupons and even stranger if you change the &limit= to different quantities say 900 it returns only 100 items if you add &page=2. According to the page 1 results; totalRecordsAvailable":1000,"totalRecordsFound":25 48 so in order to get records 1001-2000 I would need to add page=2 correct?

    This query string<YOURAPIKEY>& filterCouponCode=!null&page=1&limit=1000

    returns 1000 records. No issues.

    This query string<YOURAPIKEY>& filterCouponCode=!null&page=2&limit=1000

    returns no results...<YOURAPIKEY>& filterCouponCode=!null&page=2&limit=900

    returns only 100 results.

    Bottom line, how do I get all 2458 results? The paged request don't seem to be functioning correctly or am I doing something wrong?

    Any help would be appreciated.


    ok so just found this thread and

    So I see most people don't need all the coupon codes and just send queries on page load. So... whats the point of having a paged parameter if it doesn't work? It only returns the same 1000 codes over and over. The logic behind "it is bad practice to "download" all of the coupons anyway"
    because of
    "A search engine works by building a result set of a fixed size in memory, you can't retrieve what hasn't been calculated, and the larger the result set, the more memory, time, and cpu that are required. No one goes past the first few dozen results anyway, so returning thousands or millions of products is a waste of resources." does not make any sense. That's why a paged and limit parameter was created for the endpoint in the fist place so it would not tax system resources by returning all results. Is it not? So if the page parameter will not return anything more than the first 1000 them why even have it? If it works for accounts who have had their limits increased great. There should be some annotation of the limited functionality for standard accounts to avoid any confusion.

    That being said, may I please have my limit increased to 10000? My site is not setup to be used like that. I need to import via cron every hour.
    Last edited by affiliatex; 01-19-2015 at 02:23 PM. Reason: Update

  2. #2
    The limit is 1000 results per query, not per page. When using pagination you can get up to 1000 results per query, and break it down into smaller chunks using pagination (10 results per page for example)

  3. #3
    Hi Brian,

    Thanks for the reply. I get it. That makes sense. Can I please have my limit increased to 10000?

    Thanks in advance.

  4. #4
    No problem. Can you shoot me a pm with the request. I'm at affiliate summit through tomorrow, but will take care of it first thing when we get back.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
coupons | coupons and deals