Amazon-Advertising-API | Class Amazon Advertising API | AWS library
kandi X-RAY | Amazon-Advertising-API Summary
kandi X-RAY | Amazon-Advertising-API Summary
Connect to Amazon Advertising's API to personalize the advertisements of your web site. For more information about this class visit : Connectez vous à l'API de publicité Amazon pour personnaliser les publicités de votre site internet. Pour plus d'information à propos de cette class, visitez :
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Sends request to Amazon
- Get the unicode character
- Get the author .
- Create Image from XML
- Add a keyword
- Get the price
- Set Index Index
- Resets the keywords .
- Get price with currency
Amazon-Advertising-API Key Features
Amazon-Advertising-API Examples and Code Snippets
Community Discussions
Trending Discussions on Amazon-Advertising-API
QUESTION
I am trying to retrieve a report that I generated, and shows a 'status' of 'successful'.
When I run the script below, I receive a 200 response. However, per the docs:
"A successful call returns a 307 redirect response. The redirect link points you to the S3 bucket where you can download your report file. The report file downloads as JSON compressed in gzip format."
...ANSWER
Answered 2022-Mar-30 at 17:31import gzip # unzip compressed file
import io # read binary
import requests
import pandas as pd
headers = {
"Authorization": f"Bearer {access_code}",
"Amazon-Advertising-API-Scope": profile_id,
"Amazon-Advertising-API-ClientId": client_id
}
response = requests.get(report_url, headers=headers)
if response.ok:
json_resp = response.json()
status = json_resp['status']
if status == 'IN_PROGRESS':
# check again
elif status == 'SUCCESS':
# initiate download
location = json_resp['location']
dl_response = requests.get(location, headers=headers, allow_redirects=True)
if dl_response.ok:
compressed_file = io.BytesIO(response.content) # extract .gz file
decompressed_file = gzip.GzipFile(fileobj=compressed_file) # unzip .gz file
output = pd.read_json(decompressed_file)
elif status == 'FAILURE':
# failure response
QUESTION
I am trying to get the asins report from amazon advertising api. The header and json for creation of the report as follows,
...ANSWER
Answered 2022-Mar-17 at 13:36I have figured it out, there is a conflict for some reason, if I put both "asin" and "otherAsin" in the asins_json_data dictionary. It has to be either one of them in the metrics. According to the official document it should not happen.
QUESTION
I have the below URL:
...ANSWER
Answered 2021-Oct-05 at 14:22I finally found the solution based on the output suggested by @dave_thompson_085. I extracted the $REPORT_DOWNLOAD_URL
from the header of a different response and it still contained the \r
at the end.
QUESTION
I guess its possible to aggregate the clicks via /v2/sp/{recordType}/report
and /v2/hsa/{recordType}/report
e.g. with the compaign dimension. But since there might be row limitations, I wonder if there is a simpler way to get account or at least profile wide metric values, e.g. for clicks?
ANSWER
Answered 2020-Apr-29 at 09:20No, i think not.
Currently you have to aggregate the data anyways because it is only possible to request data for one day per request. Performance data is only returned for datasets that have at least one impression. So on campaign level it is very hard to reach row limitations if there are any (i did not yet reached any limit with the reporting service).
For the keyword report i get definitly a lot more than just 100 rows (just tested).
And btw.: API endpoints beginning with /v2/hsa are deprecated. Use /v2/sb instead. https://advertising.amazon.com/API/docs/en-us/info/release-notes
QUESTION
Request to API-Endpoint:
POST https://advertising-api-eu.amazon.com/v2/asins/report
Official documentation:
https://advertising.amazon.com/API/docs/en-us/reference/sponsored-products/2/reports
Headers:
...ANSWER
Answered 2020-Feb-28 at 13:21I asked Amazon Support and they replied:
"Asin report would need campaignType in the payload to succeed the operation. We have a documentation update pending on this. Please be noted that query segmentation is only allowed for keyword, target and productAds report. An example payload:-
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Amazon-Advertising-API
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page