Amazon Auto Links

plugin banner

Generates links of Amazon products just coming out today. You just pick categories and they appear even in JavaScript disabled browsers.

Author:Michael Uno (miunosoft) (profile at
WordPress version required:3.4
WordPress version tested:5.8.1
Plugin version:4.7.9
Added to WordPress repository:10-09-2012
Last updated:21-09-2021
Rating, %:88
Rated by:53
Plugin URI:
Total downloads:742 473
Active installs:10 000+
plugin download
Click to start download

Display Amazon Associates Affiliate Links with Minimal Effort

Still manually searching products and pasting Amazon affiliate links in WordPress posts? What happens if the products get outdated? With this plugin, you do not have to worry about it nor trouble to do such repetitive tasks. Just pick categories which suit your site and it will automatically display the links of decent products just coming out from Amazon today.

Auto Amazon Links is a WordPress plugin for affiliates to create Amazon affiliate links. The links are tagged with your Amazon Associates ID. All the Amazon locales are supported and it works even on JavaScript disabled browsers. Insert the ads as widget, place shortcode, or use auto-insert to display units automatically where the links should appear.

If you want to search a specific product, yes, you can do that too. If you are good at HTML and CSS coding and know a little about PHP, you can create your own template! That means you can design the layout.

Display Amazon affiliate links along with your posts with this plugin to earn commissions with minimal efforts.

Compatible with PA-API 5!

As of 2019/10/31, Amazon ended PA-API (Product Advertising API) v4 and your site may no longer be able to display Amazon products with old API keys. In that case, regenerate keys on the Amazon Associates member’s area and you are good to go!

Migrate from Amazon Associates Link Builder

Are you looking for an alternative to the discontinued Amazon Associates Link Builder plugin? If so, this plugin can take care of their shortcodes inserted with their Gutenberg block.

Just enable the option and you don’t have to edit thousands of posts to replace the shortcode.

Display a particular product in a post

If you want to simply display your desired specific products in a post, don’t worry. You can do that too. Just paste the product URL in the post editor. No shortcode is required.

See How Amazon Affiliate Links are Displayed

Supports All Amazon Associates Locales

Includes Australia, Brazil, Canada, France, Germany, India, Italy, Japan, Mexico, Netherlands, Singapore, Saudi Arabia, Spain, Turkey, United Arab Emirates, United Kingdom, Sweden, and United States. China is supported for the category unit type.

Works without JavaScript

Some visitors turn off JavaScript in their browsers for security reasons and most ads including Google Adsense will not show up to them. But this one works!

Automatic Insertion in Posts and Feeds

Just check where you want the product links to appear with auto-insert.

  • Static Contents Conversion – If you want the product link to be static, it is possible. This means if you deactivate the plugin, the converted contents will remain.
  • Detailed Visibility Criteria – You can enable/disable product links on the pages you want or do not want by post ID, taxonomy, page type, and post type.


You can transform your Amazon affiliate links into the ones of the locale that the site visitor resides, presumed by IP address. So you won’t miss commission fees from visitors coming outside of your country.

Auto Link Conversion

Hyper links to Amazon products in posts and comments can be transformed into your associate affiliate links. This is useful if your site allows guests to post contents that include Amazon links.


Place the widget in the sidebar and select the unit you created. The product links will appear in where you want.

  • By Units – choose the created units to display in the widget.
  • Contextual Search – with this, you don’t have to create a unit. It will automatically searches products relating to the currently displayed page contents.

Shortcode and PHP Function

Insert the ads in specific posts and pages with the shortcode. If you want to insert in the theme template, use the PHP code the plugin provides to produce the outputs.

Filter Products

You can filter out certain products you don’t want to display with a black and white list by description, title, and ASIN.

Custom Buttons

Visitors more likely click buttons than regular text hyper links. Define your custom buttons and insert it to the unit output.

Export Ads into External Sites with Feed

By subscribing to the product feed produced with the units you create as RSS or JSON, you can import them from other sites.

If you have a web site that can display RSS feed contents, just create a WordPress site somewhere with this plugin and fetch the feed from the site. If you are an App developer, you can just display the items from the feed without programming an API client.

Various Unit Options

  • Image Size – The size of thumbnails can be specified. It supports up to 500 pixel large with a clean resolution.
  • Sort Order – Shuffle the product links so that the visitor won’t get bored as it gives refreshed impression.
  • URL cloaking – You can obfuscate the link urls so it helps to prevent being blocked by browser Ad-blocking add-ons.
  • Load with Javascript – Decides whether to display units with JavaScript.
  • and more.

Customize Outputs

Besides the Item Format unit option which lets you design the output of a unit, you can create a custom template. This gives you freedom of customization and lets you achieve more advanced and detailed design.

Unit Types

  • Category – pick your category that matches your site topic.
  • Product Search – create a unit of a search result.
  • Item Look-up – display specific products.
  • URL – list items from an external web source.
  • ScratchPad Payload – for more complex PA-API queries.

Getting Started

To get started, create a unit first and display it with widgets, shortcode, or auto-insert.

Supported Language

  • English
  • Japanese
  • German
  • Italian
  • Spanish

Shortcode and Function Parameters

The following parameters can be used for the shortcode, [amazon_auto_links] or the PHP function of the plugin, AmazonAutoLinks()

id – the unit ID

[amazon_auto_links id="123"]

<?php AmazonAutoLinks( array( 'id' => 123 ) ); ?>

label – the label associated with the units

[amazon_auto_links label="WordPress"]

<?php AmazonAutoLinks( array( 'label' => 'WordPress' ) ); ?>

asin – ASINs (product IDs) separated by commas (`,`).

[amazon_auto_links asin="B016ZNRC0Q, B00ZV9PXP2"]

<?php AmazonAutoLinks( array( 'asin' => 'B016ZNRC0Q, B00ZV9PXP2' ) ); ?>

search – Search keywords separated by commas (`,`).

[amazon_auto_links search="WordPress"]

<?php AmazonAutoLinks( array( 'search' => 'WordPress' ) ); ?>

The id, asin and search arguments cannot be used together.

Optionally, the following arguments may be set.

  • country – (string) the locale of the store. Accepted values are CA, CN, FR, DE, IT, JP, UK, ES, US, IN, BR, MX, AU, TR, AE, SG, SE, and NL.
  • associate_id – (string) the Amazon Associates ID for the affiliate.
  • count – (integer) determines how many items should be displayed.
  • image_size – (integer) the image size in pixels.
  • title_length – (integer) the maximum title character length. Set -1 for no limit. Default: -1.
  • description_length – (integer) the maximum description character length. Set -1 for no limit. Default: 250.
  • link_style – (integer) the link style. Accepted values are 1, 2, 3, 4, and 5. Default: 1.
    • 1 –[domain-suffix]/[product-name]/dp/[asin]/ref=[…]?tag=[associate-id]
    • 2 –[domain-suffix]/exec/obidos/ASIN/[asin]/[associate-id]/ref=[…]
    • 3 –[domain-suffix]/gp/product/[asin]/?tag=[associate-id]&ref=[…]
    • 4 –[domain-suffix]/dp/ASIN/[asin]/ref=[…]?tag=[associate-id]
    • 5 – http://localhost/wp47?productlink=[asin]&locale=[…]&tag=[associate-id]
  • credit_link – (integer|boolean) whether to show the credit link. 1/true to show, 0/false to hide.
  • subimage_size – (integer) the sub-image size in pixels. Default: 100.
  • subimage_max_count – (integer) the maximum number of sub-images to display.
  • customer_review_max_count – (integer) the maximum number of customer reviews.
  • show_now_retrieving_message – (boolean|integer) whether to show the “Now retrieving…” message when sub-elements are pending to be fetched. true/1 to show false/0 to hide.
  • button_type – (integer) The type of buttons. The following values are accepted. Default: 1.
    • 0 – Link to the product page.
    • 1 – Add to cart.
  • load_with_javascript – [3.6.0+] (boolean|integer) whether to load the unit with JavaScript. true/1 to yes, false/0 to no.
  • product_title – [4.0.0+] (string) An alternative text to alter the product title for anchor text. This is only supported when the asin argument is set.
  • show_errors – [4.1.0+] (integer) Whether to show the output error. Default: 2.
    • 0: do not show error.
    • 1: show the error.
    • 2: show the error in an HTML comment.

These values can be pre-defined from the setting page via Dashboard -> Amazon Auto Links -> Settings -> Default.
If these arguments are omitted, the values set in the setting page will be used.

Shortcode to Display Buttons

Although with the %button% tag in the Item Format unit option allows you to insert a button, a button itself can be displayed indipendently with the shortcode, [aal_button ...].

It accepts the following parameters.

  • asin – (required, string) Comma delimited ASINs.
  • type – (optional, integer) 0: Link to the product page, 1: Add to cart button. Default: 1.
  • id – (optional, integer) The button ID. To use the button created via Dashboard -> Amazon Auto Links -> Manage Buttons, specify the button ID.
  • quantity – (optional, integer) The quantity of the item to add to cart. When multiple ASINs are specified, separate the values by commas.
  • country – (optional, string) The locale of the marketplace. If not set, the default value set in the Default setting tab will be applied.
  • associate_id – (optional, string) The associate tag. If not set, the default value set in the Default setting tab will be applied.
  • access_key – (optional, string) The public PA-API key. If not set, the default value set in the Authentication tab will be applied.
  • label – (optional, string) The button label. e.g. ‘Buy Now’. Default: Buy Now.
  • offer_listing_id – (optional, scalar) An offer listing id that Amazon gives.

How to Create Own Template

Step 1

Copy an existing template that is located in ...wp-content/plugins/amazon-auto-links/template and rename the copied folder.

Step 2

Remove the files besides style.css and template.php as other files are optional.

Step 3

Edit style.css and template.php to customize the layout.

Step 4

Create a folder named amazon-auto-links in your theme’s folder. If you are using Twenty Thirteen, the location would be ...wp-content\themes\twentythirteen\amazon-auto-links.

Step 5

Move the working folder(the copied one) to it (the amazon-auto-links folder you just created).

Step 6

The plugin will automatically detect your template and add it in the template listing table. So activate it.

Upgrading V1 to V2

When upgrading v1 to v2, a few options will be lost. That includes:

  • Sidebar widget
  • The positions of the inserting area

These options need to be reconfigured.

How to Obtain Access Key and Secret Key

An access and secret keys are required to perform API requests. We need to deal with additional two separate Amazon services apart from Amazon Associates.

For detailed instructions, please refer to the To register as a Product Advertising API developer section.

Step 1 – Create a Product Advertising API Account

Before you create an access key, you have to make sure you have singed up with Amazon Product Advertising API.

Step 2 – Sign up with Amazon Web Service

Next, create an account with Amazon Web Service( At the top right pull-down menu, you can navigate to My Account/Console -> Security Credential.

Step 3 – Create an Access Key

In the Security Credentials page, find the section named Access Keys (Access Key ID and Secret Access Key) and click on that.

Then press the Create New Access Key button to create a key. Don’t forget to keep the secret access key as well. Amazon has changed the policy not to let the user to obtain the secret key later on.

Also note that at the point that an access key is issued, if you have not created an account with Product Advertising API, the key will be invalid. If that happens, delete the created access key and go back to the previous step.

You can check if your access key is valid or not with Scratchpad.