What is an API request?

The following article pertains to using these plugins

Relating to the Comparison Sets Plugin

This article does not pertain to API requests in regards to the Comparison Sets plugin. Regarding the Comparison Sets plugin, between 2 and 6 API requests will be generated every time a Comparison Set on your site is created or its cache is updated. You can learn more here.

This page explains what an API request is and what counts as an API request. We will also give some examples of how many API requests are incurred when building and maintaining your store using the plugins listed above. You can find a brief FAQ at the bottom of this page.

A Few Key Concepts

Database - A database is just a collection of organized information. Datafeedr's database contains information about 270+ million products from over 12,000 merchants.

API keys - API keys allow you to access our database, kind of like a username and password. When you sign up for our service, we provide you with a unique set of API keys.

Query - A query is a request to get information from a database.

API Request - An API request is a query to our database of products.

What counts as an API request?

Four types of actions create API requests:

1

Searching for products

When you search for products to add to your store, an API request is made each time you click [Search]. Each batch of products displayed on the search results page counts as one request, not each product. Paginating through each page of your search results also creates one API request per page.

2

Updating network and merchant data

Network and merchant data is updated automatically every day. Updating network-related data requires 1 API request. Updating merchant-related data requires 1 API request for each network you have selected.

3

Updating product data

When you save your Product Set, it will be queued for update. During the update, the Product Set will query the database for the products to import into your store. For large sets of products, queries are sent in batches. Every batch of 100 products incurs 1 API request.

After the initial import of products into your store, product data will update at regular intervals. The default interval is every 7 days. The number of API requests incurred at each update will depend on the total number of products in your Product Set. The minimum number of API requests for 1 Product Set updating every 7 days will be roughly 4 per month.

4

Editing a Product Set

When you navigate to the Edit Product Set page, you will incur up to 3 API requests depending on whether you have any products in the following tabs: Saved Search, Blocked Products, Single Products. If you have no products under a tab, no API request will incur.

If you modify your query and click [Search], this will generate 1 API request. Modifying products on the Single Products or Blocked Products tabs, without clicking [Search] or [Update], will NOT generate an API request. These changes will not be reflected in your store until the next Product Set update, at which time API requests will incur in batches of 100 as described above.

Examples - Number of API Requests Generated per Action

Searching

Example A: Your search returns 5 products. All 5 items display on the first page of search results. This counts as 1 API request.

Example B: Your search returns 450 products. The first 100 products display on the first page of results, so this incurs 1 API request. You go to page two and display the next 100 products; this incurs 1 more API request, and so on. To view all 450 products-- one page at a time-- will incur 5 API requests in total.

Example C: Your search is specific and only returns a single product. This counts as 1 API request.

Example D: Your search returns 0 products. This still counts as 1 API request.

Updating Network and Merchant Data

Example E: You belong to one affiliate network:

January  (1 network update + 1 network merchant update) x 31 days = 62 API requests
February (1 network update + 1 network merchant update) x 28 days = 56 API requests

Example F: You belong to three affiliate networks:

January  (1 network update + 3 network merchant updates) x 31 days = 124 API requests
February (1 network update + 3 network merchant updates) x 28 days = 112 API requests

Updating Product Data

Example G: Your Product Set contains 85 products and updates every three days:

January  1 batch x (31 days / 3) = 10 API requests
February 1 batch x (28 days / 3) =  9 API requests

Example H: Your Product Set contains 1000 products (10 batches of 100) and updates every three days:

January  10 batches x 10 updates/month = 100 API requests
February 10 batches x  9 updates/month =  90 API requests

Example I: You have 10 Product Sets with 800 products per set (8 batches of 100) updating every three days:

January  10 sets x 8 batches/set x 10 updates/month = 800 API requests
February 10 sets x 8 batches/set x  9 updates/month = 720 API requests

Editing a Product Set

Example J: You have 85 products in your Product Set, all listed under the Saved Search tab. You load the Edit Product Set page. This incurs 1 API request.

Example K: You have 85 products in your Product Set, listed under the Saved Search tab as well as the Single Products tab. You also have some products under the Blocked Products tab. You load the Edit Product Set page. This incurs 3 API requests.

Example L: You have 350 products in your Product Set, with some products under each of the 3 tabs. You load the Edit Product Set page (3 API requests). First, you remove a few products from the Blocked Products tab (0 API requests). Next, you modify your search query, click [Search], returning 320 products (1 API request). You navigate to page two and page three of your new search results (2 API request). You block 3 products (0 API requests). You click [Update Saved Search] (0 API requests). Total: 6 API requests incurred during this editing session.

Start-to-Finish Example

First Month: Store Creation
Action Number of API Requests
Perform a product search which returns 885 products. 1
Paginate through pages 2~9 of results (100 products per page). 8
Perform an additional product search to refine your product list to 280 products. 1
Paginate through pages 2 and 3 of results (100 products per page). 2
Perform an additional product search to refine your product list to 60 products. 1
Publish your Product Set. 1
You belong to one network. Network and merchant data updates daily. 60
Product Set updates every 3 days for one month. 10
TOTAL 84
Second Month: Product Set Editing
Action Number of API Requests
Click [Edit Product Set] (60 products listed under Saved Search). 1
Modify search parameters, click [Search], returning 85 products. 1
Block 5 products from search results. 0
Click [Update Saved Search]. 0
View your store on the web. 0
Click [Edit Product Set] (80 products listed under Saved Search, 5 listed under Block Products). 2
Remove 2 products from Blocked Products tab. 0
You belong to one network. Network and merchant data updates daily. 60
Product Set updates every 3 days for one month. 10
TOTAL 74

Frequently Asked API Questions

Does selecting a lot of merchants from one network generate more API requests?
No, selecting one or all of the merchants from a single network will generate the same number of API requests during network/merchant data updates.

If my search returns thousands of products, does that incur thousands of API requests?
No, not unless you paginate through all of the search results. Each page of search results makes 1 API request, but only when you view that page.

Can I change the number of products shown on my search results page?
Yes, the default number of search results shown per page is 100, but you can lower this setting. However, the maximum number of products returned by the API at one time is 100.

Will changing the number of products returned on my search results pages affect the number of API requests?
Yes. The default (and maximum) number of products returned at one time is set to 100, but you can lower this number. However, by lowering the number of products shown per page you will incur more API requests when paginating through the same number of search results.

Can I change the number of products which are imported or updated per batch?
Yes, you can change the number of products per update on the Configuration page. However, 100 is the maximum.

When website visitors view a product on my site, does this generate an API request?
No, only interacting with our database generates API requests. Website traffic does not affect the number of API requests because once you've imported products to your store that data is stored on your website's server.

However, if you are using our Comparison Sets plugin, then when a Comparison Sets is first generated or its cache is refreshed, then API requests (between 2-6 requests) will be generated. Comparison Set generation only happens on the front end of your website therefore API requests will be generated when visitors and bots visit your site. To reduce the amount of API requests your Comparison Set plugin uses, increase the Cache Lifetime here: WordPress Admin Area > Datafeedr API > Comparison Sets.

What happens if I use more API requests than my plan allows?
You can't exceed your limit. When you reach your limit of API requests, product updates will automatically be disabled. All API requests will return a "DatafeedrLimitExceededError" error until your count resets. You will not be billed extra. Your API request count resets to zero every 30 days. However, you can upgrade your plan to get more API requests.

If I reach my API limit before the end of my 30-day period, will my store disappear?
No, your store will never disappear unless you delete it. However, if you reach your API limit before the end of the 30-day period, your products will not be updated with the latest information. You can upgrade your plan to get more API requests.

Still need help? Contact Us Contact Us