PHPackages                             thecodebunny/pa-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. thecodebunny/pa-api

ActiveLibrary[API Development](/categories/api)

thecodebunny/pa-api
===================

TheCodeBunny\\PaApi 5.0 PHP SDK

120PHP

Since Apr 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/thecodebunny/pa-api)[ Packagist](https://packagist.org/packages/thecodebunny/pa-api)[ RSS](/packages/thecodebunny-pa-api/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Product Advertising API 5.0 SDK for PHP
=======================================

[](#product-advertising-api-50-sdk-for-php)

[![Version](https://camo.githubusercontent.com/90a20f9013101d21789c67d994065a5bedde1f73aaa0b629b3cafb8255a041e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746865636f646562756e6e792f70612d617069)](https://img.shields.io/packagist/v/thecodebunny/pa-api)

[![Total Downloads](https://camo.githubusercontent.com/f015f17bb20156cb198267fa3d028d9fc7e083ee71e4fa3b217b3f2851b09fd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746865636f646562756e6e792f70612d6170692e7376673f7374796c653d666c6174)](https://packagist.org/packages/thecodebunny/pa-api)

This repository contains the open source PHP SDK that allows you to access the [Product Advertising API](https://webservices.amazon.com/paapi5/documentation/index.html) from your PHP app.

Copy of Amazon's Provided Code
------------------------------

[](#copy-of-amazons-provided-code)

This is a near identical public copy of [Amazon's provided code](https://webservices.amazon.com/paapi5/documentation/quick-start/using-sdk.html), as their version is not available through Packagist as of writing.

We have not changed the API in any way, however we did cleanup portions of the code and have updated dependencies. A listing of changes are provided below.

### Changes from Amazon

[](#changes-from-amazon)

- Replaced usage of `\GuzzleHttp\Psr7\build_query` with `\GuzzleHttp\Psr7\Query::build`
- Added Support for Guzzle 7
- Removed Deprecation Warnings when using PHP 8
- Removed Dynamic Property Creation Warnings when using PHP 8
- Updated PHP Minimum Version to PHP 8
- CodeSniffed to PSR-2
- Updated Dev Dependencies to reflect PHP 8 version requirement

Installation
------------

[](#installation)

The Product Advertising API PHP SDK can be installed with [Composer](https://getcomposer.org/). The SDK is available via [Packagist](http://packagist.org/) under the [`thecodebunny/pa-api`](https://packagist.org/packages/thecodebunny/pa-api) package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency:

```
composer require thecodebunny/pa-api
```

Usage
-----

[](#usage)

> **Note:** This version of the Product Advertising API SDK for PHP requires PHP 5.5 or greater.

Simple example for [SearchItems](https://webservices.amazon.com/paapi5/documentation/search-items.html) to discover Amazon products with the keyword 'Harry Potter' in Books category:

```
