Selling Partner API BlogVideos
SP-API DocsDeveloper ConsoleSupport
SP-API DocsDeveloper ConsoleSupport

Reducing API calls with batch functionality

How to use the batch operations available in SP-API to reduce call volume and save resources.

by Rugved D., Solutions Architect, Selling Partner Developer Services | July 27, 2022

In the May release, the Selling Partner API team announced support for batch operation requests, which help you get the same amount of data with fewer calls. Certain operations in the Product Fees API v0, Product Pricing API v0, and Catalog Items API v2022-04-01 can now accept a list of 20 identifiers in a single request. These batch operations can help you decrease the number of API calls, reduce infrastructure costs, and reduce throttling errors received while implementing 1x1 API operations.

This blog post walks you through the SP-API batch operations and how to use them to reduce call volume and save resources.

📘

Watch the video

For a video overview of these batch operations, refer to the Batch Operations in SP-API Video

SP-API batch operations

The table below shows a comparison of the operations in Marketplace Web Services (MWS) and SP-API. You can use the batch operations in the third column to replace the 1x1 operations that were available in SP-API.

Note: The Selling Partner API team recently announced a drop in throttle limits for these 1x1 operations. For more information, refer to SP-API throttling adjustments.

MWS1X1 SP-APIBatch SP-API operation
GetMatchingProduct
GetMatchingProductForId
GET /catalog/2022-04-01/items/{asin}
GET /catalog/2022-04-01/items
searchCatalogItems
GET /catalog/2022-04-01/items
GetLowestOfferListingsforASINGET /products/pricing/v0/items/{Asin}/offersgetItemOffersBatch
GetLowestOfferListingsforSKUGET /products/pricing/v0/listings/{SellerSKU}/offersgetListingOffersBatch
GetMyFeeEstimatesPOST /products/fees/v0/items/{Asin}/feesEstimate
GET /products/fees/v0/listings/{SellerSKU}/feesEstimate
getMyFeesEstimates
GetCompetitivePricingForASINGET /products/pricing/v0/competitivePricegetCompetitivePricing

Here is a breakdown of the five batch operations highlighted above in the table:

Catalog Items API v2022-04-01 batch operations

The searchCatalogItems operation of the Catalog Items API v2022-04-01 allows you to search the Amazon catalog for existing items using keywords or up to 20 product identifiers. You can use product identifiers like ASIN, UPS, EAN, ISBN, GTIN, JAN, MINSAN, or SKU to look for products. If you provide 10 identifiers and the response only provides five products in the response, then it means that only five were found to match the identifiers. For more information about how to search for one or more items with ASINs or product identifiers, you can refer to the tutorial Search for one or more items by ASINs or product identifiers.

Usage plan:

Rate (requests per second)Burst
2 2

The default transactions per second (TPS) limit for this operation is 2 requests per second (RPS) with a burst limit of 2. You can make a request up to 20 ASINs in one single request, which would allow you to search for 40 ASINs per second. This operation has burst limit as 2, which means that once you make two requests, you will have to wait one second to make another two requests. Make sure you add an exponential backoff mechanism in the solution to let the API scale and not hit the throttle limit. For more information about the rate limit, burst, and token bucket algorithm, refer to Usage Plans and Rate Limits in the SP-API. In MWS, there was a limit of 18,000 items per hour. SP-API does not have this limit. With the updated limits for batch operations, you can call 144,000 items per hour.

Product Pricing API batch operations

The Product Pricing API supports three batch operations: getItemOffersBatch, getListingOffersBatch and getCompetitivePricing. The getItemOffersBatch and getListingOffersBatch operations allows you to fetch the pricing information for catalog items based on the Amazon Standard Identification Numbers (ASINs) and Stock Keeping Units (SKUs) respectively. The batch operation allows you to make 20 ASINs requests to getItemOffers and 20 SKUs requests to getListingOffers in one single API call.

For the getItemOffersBatch operation, you can create a request body with the list of 20 getItemOffers requests using the “uri” parameter. This parameter will include the endpoint for getItemOffers /products/pricing/v0/items/{Asin}/offers. Similarly, for the getListingOffersBatch operation, you can create a request body with the list of 20 getListingOffers requests using the “uri” parameter that includes the endpoint for getListingOffers /products/pricing/v0/listings/{SellerSKU}/offers. For more information on how to call the batch operations for the Product Pricing API, you can refer to the Product Pricing API Use Case Guide.

Usage plan for getItemOffersBatch and getListingOffersBatch:

Rate (requests per second)Burst
0.5 1

The default TPS limit for operations getListingOffersBatch and getItemOffersBatch is 0.5 requests per second (RPS) with a burst of 1. You can make 30 requests in a minute, which would allow you to get lowest priced offers data for 600 ASINs or SKUs in a minute. Since this operation has burst as 1, it means that once you make one request, you will have to wait for 2 seconds to make another request. Make sure you add an exponential backoff mechanism in the solution to let the API scale and not hit the throttle limit. For more information about the rate limit, burst and token bucket algorithm, refer to Usage Plans and Rate Limits in the SP-API.

The getCompetitivePricing operation allows you to get competitive pricing information for a seller’s offer listings based on Seller SKU or ASIN. You can add up to 20 SKUs or ASINs in the request.

Usage plan for getCompetitivePricing:

Rate (requests per second)Burst
0.5 1

The default TPS limit for the getCompetitivePricing operation is 0.5 requests per second (RPS) with a burst of 1. You can make a request to 20 ASINs or SKUs in one single request, which would allow you to search for 10 ASINs or SKUs per second. Since this operation has burst as 1, it means that once you make one request, you will have to wait 2 seconds to make another request. Make sure you add a back-off mechanism in your solution to let the API scale and not hit the throttle limit. You can find more information about the rate limit, burst and token bucket algorithm in Usage Plans and Rate Limits in the SP-API

Product Fees API batch operations

The getMyFeesEstimates operation of the Product Fees API allows you to fetch estimated fees for a list of products. This operation allows up to 20 product requests in a single batch. With the FeesEstimateRequest operation you can create a list that contains a product, marketplace, and a proposed price used to request estimated fees.

Usage plan:

Rate (requests per second)Burst
0.5 1

The default TPS limit for the getMyFeesEstimates operation is 0.5 requests per second (RPS) with a burst of 1. You can make a request to 20 ASINs in one single request which would allow you to search for 10 ASINs per second. Since this operation has burst as 1, it means that once you make one request, you will have to wait for 2 seconds to make another requests. Make sure you add a back-off mechanism in the solution to let the API scale and not hit the throttle limit. You can find more information about the rate limit, burst and token bucket algorithm in Usage Plans and Rate Limits in the SP-API

Processing batch operation requests

The batch operation allows you to make 20 separate requests using SKUs or ASINs from one single API call. You will receive a response about each individual request in the response of this batch operation. For example, if you make a request to get the lowest priced offers for 20 ASINs or SKUs and the operation can only get data for 18 of these ASINs or SKUs, then the operation returns results for the 18 ASINs or SKUs instead of failing the entire request. The operation also indicates that the remaining two ASINs or SKUs failed. The operation response returns a status attribute that indicates whether or not data can be returned for the specified product identifier. The batch operations that follow this behavior are: getListingOffersBatch, getItemOffersBatch, getCompetitivePricing, and getMyFeesEstimates.

Conclusion

In this blog, you learned about the batch operations of Selling Partner API, usage plans for the batch operations, and and how to use them to reduce API calls and save resources. For a video overview of these operations, refer to the Batch Operations in SP-API Video.

👍

Have feedback on this post?

If you have questions or feedback on this post, we'd like to hear from you! Please vote and leave a comment using the tools at the bottom of this page.

Subscribe to updates via RSS feed.