Will it AI | Creating Amazon Affiliate Links Using a List of Product Descriptions Programmatically
Brian Brian
4.06K subscribers
18 views
0

 Published On Jun 26, 2024

I used GPT to create the python code, that takes the description of an item in an excel document...in this case book titles and authors, to find the relevant Amazon url, and then add the affiliate tag on programmatically across multiple products and reinsert the resulting url into the excel file. This will require the use of a Google Cloud console, that may cost a modest amount of money if you're doing a large number of product descriptions. But I assure you, paying someone to do this for you would cost far more.

***
URL (to set up search api and cx keys): https://developers.google.com/custom-...

GPT prompt: I need a python script. The script will utilize the google cloud console programmatic search function and possible the gpt ai if it's needed. The script will need to access an excel document i have here: "your file path" . In column A there is a header that says "title", and then below it are the titles of various books. In column b there is a header that says "author" and the author of the book is listed next to the title. I need the script to open the excel document and pull the author and the title and do a google search using the search console (the api key is: 'your key', and the engine code is: 'your cx key'. I need the search to find the amazon link for the said book. Once the url is found, I need the code to remove everything after the dp/ and instead insert my affiliate tag: 'your affiliate tag'
. So for example, for the url: https://www.amazon.com/Brambleberry-M... I need it to say: https://www.amazon.com/Brambleberry-M.... This url should be placed in column c under the existing header: Amazon tag, next to the corresponding author and title.

github link to code: https://github.com/brianleedick/amazo... (you'll need to update all capitalized letter placeholders...there are 3 placed you need to update)

show more

Share/Embed