PHPackages                             thewirecutter/paapi5-php-sdk - 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. thewirecutter/paapi5-php-sdk

ActiveLibrary[API Development](/categories/api)

thewirecutter/paapi5-php-sdk
============================

ProductAdvertisingAPI 5.0 PHP SDK

v1.3.0(6mo ago)671.8M↓19.5%32[1 PRs](https://github.com/thewirecutter/paapi5-php-sdk/pulls)5Apache-2.0PHPPHP ^8.0

Since Oct 17Pushed 1mo ago11 watchersCompare

[ Source](https://github.com/thewirecutter/paapi5-php-sdk)[ Packagist](https://packagist.org/packages/thewirecutter/paapi5-php-sdk)[ Docs](https://webservices.amazon.com/paapi5/documentation/index.html)[ RSS](/packages/thewirecutter-paapi5-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (11)Used By (5)

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

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

[![Version](https://camo.githubusercontent.com/15744f798a6c0c03424e9d2df3abfb6f0daf74c1ac8eb3660f4eaf194c3050af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746865776972656375747465722f7061617069352d7068702d73646b)](https://packagist.org/packages/thewirecutter/paapi5-php-sdk)[![Total Downloads](https://camo.githubusercontent.com/95309781c78163a1d954e7937037fbce9ed2600abd74316cd1ede94385ff2935/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746865776972656375747465722f7061617069352d7068702d73646b2e7376673f7374796c653d666c6174)](https://packagist.org/packages/thewirecutter/paapi5-php-sdk)[![CircleCI](https://camo.githubusercontent.com/9c2ca9935918754882065fa30c320a05f30f40a513df844565cd61b6b520e1ab/68747470733a2f2f636972636c6563692e636f6d2f67682f746865776972656375747465722f7061617069352d7068702d73646b2e7376673f7374796c653d737667)](https://circleci.com/gh/thewirecutter/paapi5-php-sdk)

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` [\#8](https://github.com/thewirecutter/paapi5-php-sdk/pull/8)
- Added Support for Guzzle 7 [\#6](https://github.com/thewirecutter/paapi5-php-sdk/pull/6)
- Removed Deprecation Warnings when using PHP 8 [\#13](https://github.com/thewirecutter/paapi5-php-sdk/pull/13)
- Removed Dynamic Property Creation Warnings when using PHP 8 [\#13](https://github.com/thewirecutter/paapi5-php-sdk/pull/13)
- Updated PHP Minimum Version to PHP 8 [\#13](https://github.com/thewirecutter/paapi5-php-sdk/pull/13)
- CodeSniffed to PSR-2 [\#13](https://github.com/thewirecutter/paapi5-php-sdk/pull/13)
- Updated Dev Dependencies to reflect PHP 8 version requirement [\#13](https://github.com/thewirecutter/paapi5-php-sdk/pull/13)

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 [`thewirecutter/paapi5-php-sdk`](https://packagist.org/packages/thewirecutter/paapi5-php-sdk) 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 thewirecutter/paapi5-php-sdk
```

Usage
-----

[](#usage)

> **Note:** This version of the Product Advertising API SDK for PHP requires PHP 8 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:

```
