Amazon Product Advertising API Integration Advance - Item | Product Search by Keywords with Script Code




Amazon Product Advertising API Integration Advance - Item/Product Search by Keywords



Hopefully you are ready with all prerequisite for integrating Amazon Product Advertising API as per our Amazon Product Advertising API integration Basics
We are now going to demonstrate how you can implement functionality to get/fetch the items/Products from Amazon Product Base as per your specified search keywords and specific category. You can provide “All” if you want to search the product within all the available item base.

/*
* This function will give you first 10 top seller items on the basis of keyword provided
*/

/*
 * To handle item search
 */

$amazonEcs = new AmazonECS(AWS_API_KEY, AWS_API_SECRET_KEY, COUNTRY_CODE, AWS_ASSOCIATE_TAG);

$amazonEcs->associateTag(AWS_ASSOCIATE_TAG);


function getSearchResults($key) {

    global $amazonEcs;

    try {
        $response = $amazonEcs->category('All')->responseGroup('Medium,OfferSummary,VariationSummary')->search($key);

// You can change the parameters ( “Medium,OfferSummary,VariationSummary” ) according to your need

    } catch (Exception $e) {

        $response = $e->getMessage() ;

    }

    return $response;
}


When you get the valid response from here you can easily parse the object as in case of product item feed. You can check the same at Amazon Product Advertising API Integration Advance - Fetch Top Seller Item Feed


Note: Amazon Product Advertising API has threshold limit over request so avoid quick requests. You may add some delay at your side to make request after some delay.




Thanks for your valuable comments and suggestion.

 


Comments

  1. Thanks for sharing this useful content. The MEDca Benzalkonium Chloride wipes is both! With power to clean your hands, scrapes, cuts, minor burns, cleans multiple surfaces wipes sanitizer

    ReplyDelete

Post a Comment

Popular posts from this blog

MWS (Amazon Marketplace Web Service) API Integration

CURL Basics with Example

YouTube TV | Know All About Features, Subscription & Access