akaszynski / keepa Goto Github PK
View Code? Open in Web Editor NEWPython Keepa.com API
Home Page: https://keepaapi.readthedocs.io/en/latest/
License: Apache License 2.0
Python Keepa.com API
Home Page: https://keepaapi.readthedocs.io/en/latest/
License: Apache License 2.0
Brief example should be showing the following:
import keepa
accesskey = 'XXXXXXXXXXXXX' # enter real access key here
api = keepa.Keepa(accesskey)
# Single ASIN query
products = api.query('B0088PUEPK') # returns list of product data
# Plot result (requires matplotlib)
keepa.plot_product(products[0])
As api = keepa.Api(accesskey)
line is throwing an error saying:
module 'keepa' has no attribute 'Api'
Hello, I'm a user of keepa,Can keepa API provide information about inventory?
Looking to use the keepa api to pull historical prices and sales rank over the last year from amazon. Any example python code you can point me to that I can lift?
Hi, all,
I have purchase keepa api and got its key. But I am new to python and still don't know how to get daily sales rank data per Asin?
here is my code:
import keepa
import logging
import inspect
logging.basicConfig()
import datetime
import requests
import numpy as np
accesskey = 'xxxxx'
api = keepa.Keepa(accesskey)
asins = 'B00IIFW2L4'
products = api.query(asins, offers=20, stats=90, history=0, rating=1) # I think you were missing this
product = products[0]
offers = product['offers']
categoryTree = product['categoryTree']
stats = product['stats']
print('\nASIN is:\n' + products[0]['asin'])
currentPrice = stats['current'][18]
currentRank = stats['current'][3]
print ('Current Price:\t\t\t' + str(currentPrice/100.00))
print ('Current Rank:\t\t\t' + str(currentRank))
here is the output:
ASIN is:
B00IIFW2L4
Current Price: 64.99
Current Rank: 621
But what i want is historical daily sales rank data, like:
Date(daily): sales rank price USD
10222014 1 70.00
10232014 3 69.00
… …
08252019 1 64.99
Would you please help me on it? thanks
The function ProductQuery (on line 512 of interface.py) does not correctly handle the "update" parameter: it is always passed on as "None" through the settings dict. The mistake is on line 721 I believe.
When querying a list of products and attempting to retrieve offers, e.g. by using
api.ProductQuery(asins, offers=20, update=0)
the offers parameter is still treated as a bool eventually: while the api.ProductQuery function correctly interprets it as integer, it then passes it on to the (top-level) function ProductQuery via ThreadRequest and the function ProductQuery still checks whether offers is true (which any number above zero gets converted to) and then sets the `offers' parameter for the payload at 1000.
(Off-Topic: Thank you so much for developing this API, makes my life a hell of a lot easier. Really appreciate it!)
asins = ['B01I6KT07E', 'B01G5BJHVK', 'B017LJP1MO']
above asins return the following error when trying to plot graphs using the below code:
products = api.query(asins)
keepa.plot_product(products[0])
Any advice?
Error:
Traceback (most recent call last):
File "D:/python_projects/keepa/test.py", line 29, in <module>
keepa.plot_product(products[0])
File "D:\python_projects\keepa\venv\lib\site-packages\keepa\plotting.py", line 114, in plot_product
plt.show(block=True)
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\pyplot.py", line 254, in show
return _show(*args, **kw)
File "C:\Program Files\JetBrains\PyCharm 2018.3.1\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 25, in __call__
manager.show(**kwargs)
File "C:\Program Files\JetBrains\PyCharm 2018.3.1\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 107, in show
self.canvas.show()
File "C:\Program Files\JetBrains\PyCharm 2018.3.1\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 62, in show
self.figure.tight_layout()
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\figure.py", line 2374, in tight_layout
pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect)
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\tight_layout.py", line 366, in get_tight_layout_figure
pad=pad, h_pad=h_pad, w_pad=w_pad)
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\tight_layout.py", line 115, in auto_adjust_subplotpars
tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\tight_layout.py", line 116, in <listcomp>
if ax.get_visible()])
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axes\_base.py", line 4373, in get_tightbbox
bb_xaxis = self.xaxis.get_tightbbox(renderer)
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axis.py", line 1140, in get_tightbbox
ticks_to_draw = self._update_ticks(renderer)
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axis.py", line 1023, in _update_ticks
tick_tups = list(self.iter_ticks()) # iter_ticks calls the locator
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\axis.py", line 967, in iter_ticks
majorLocs = self.major.locator()
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\dates.py", line 1230, in __call__
self.refresh()
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\dates.py", line 1250, in refresh
dmin, dmax = self.viewlim_to_dt()
File "D:\python_projects\keepa\venv\lib\site-packages\matplotlib\dates.py", line 1001, in viewlim_to_dt
.format(vmin))
ValueError: view limit minimum -0.001 is less than 1 and is an invalid Matplotlib date value. This often happens if you pass a non-datetime value to an axis that has datetime units
Alex, I’ve read through your incredibly helpful documentation and have enjoyed working with the module you’ve put together, but I’ve had a lot of difficulty trying to limit the the price data to only the most recent 180 days. Is there anyway you could tell me or show how I would go about implementing that condition onto a product query so when I submit a query for asin(s) it’s only returning the last 180 days? Not the most recent 180 listings but the earliest (first) price listing for each day of a product for the last 180 days. I’d like return 180 records for each product, one price per day. Do I use the LISTPRICE key and could I combine that query with one sales rank per day as well?
It may be just my primary language and experience is with R but I was hoping you would shed some light on the matter as there is very little online information/guidance on Keepa.
Is there a way to Output the latest Sales rank for an array of ASINs
I'm new to Python, it'll really help me out if there's a hint I could use.
I'm able to find the rank in the JSON output under the product object > csv, I'm still hopinh im looking in the right direction. Any help would be appreciated.
Dear Keepa Community,
Trust you are well. I would like to ask for your help regarding how to install Keepa on Python.
I just have subscribed to Keepa to extract historical prices on Amazon; however, I am not sure where to start. Could you please guide me through the process? For your information, I am new to Python and would like to start learning it.
Best regards,
nakazas
I search product price in several countries to know difference in price.
And Amazon sometimes sells same products with different ASIN .
In this case I cannot get the difference by using this API .
To resolve this problem , we can search products by using EAN or JAN too.
EAN and JAN is only code for each product . So using them is good way I think .
I asked keepa help . And I was told to do feature request .
https://keepa.com/#!discuss/t/can-we-search-by-using-ean-or-jan/7395
But I could not understand where feature request was .
So if here was not for feature request , sorry for making trouble .
And Thank you so much for developing this API.
I have used three APIs. This API is most simple design to use.I appreciate your works!!
Hi,
Thanks for making the software available. Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Windows 10 32bit
on a HyperV virtual machine
Same error on my Windows 10 64bit machine
I install the module using “pip install keepa”
Running this code in sublime3:
import keepa
accesskey = ‘6999999999999999999999999’
api = keepa.Keepa(accesskey)
products = api.query(‘B0088PUEPK’) # returns list of product data #B07D3DTW4G
I get: AttributeError: module ‘keepa’ has no attribute ‘Keepa’
i also tried the same code with the following in place of api = keepa.Keepa(accesskey)
api = keepa.Api(accesskey)
Same error.
Any help would be appreciated.
Thanks
How to convert keepa time into a timestamp,I don't know the rules.. like 3574824 -> 1508358211007
Hi,
BestSellersQuery, won't return anything.
It says "Best sellers search results not yet available" for valid categories I query
Is this keepa related or python API related
Lately I have been encountering an error when running the API more frequently than I used to. This error seems to be related with the multiple threads part of the API.
Please see below/attached a screenshot of the error:
I used to get this error every now and then. But now it seems to be more persistent. I have tried to to add the option nthreads=1 but to no avail. I am not sure whether the problem is with my Python installation or with the API itself. I am using Python 3.5.2 :: Anaconda 4.2.0 (64-bit).
I am using the API version keepaAPI-0.12-py3.5. I have tried to update to the newer one, but a similar error occurs with the same frequency and I found the newer API to give less info about the queries (i.e. no output on how many Asins were completed).
Thanks for the great work on the API Alex.
It seems that Keepa ProductQuery takes stock parameter to update the stock quantity. Can you include this parameter in the interface as well? I don't see it now.
https://keepa.com/#!discuss/t/request-products/110
Thanks
(module 'keepa' has no attribute 'Api')
or
module ('keepa' has no attribute 'keepa')
It looks like you introduced some python 3 specific f-strings, which make the code no longer works for python 2? In interface.py you have:
raise RuntimeError(f'Invalid key "{key}"')
Would it be possible that you keep it backwards compatible with python 2?
Thanks
Get price for FBA sellers only, instead of all items in new condition (FBA+FBM)
It appears that parameter page and perPage is left out of for product_parms in product_finter, thus one can only retrieve 50 results in product_finder, unable to page through to get remaining result. Can it be added into PRODUCT_REQUEST_KEYS?
Thanks
Hi,
the returned dictionary doesn't have the csv field, can this be added?
Also data dictionary is missing tradein data and condition data.
Can these functionalities be added?
Hi,
After I run this in python 3.5.2. There is an error comes out.
How could I solve this?
from keepaAPI import Interface
accesskey = 'XXXXXXXXXXXXXXXX' # enter real access key here
api = Interface.API(accesskey)
#Single ASIN query
products = api.ProductQuery('059035342X') # returns list of product
ERROR:
INFO : Connecting to keepa using key XXXXXXXXXXXXXXXX
Traceback (most recent call last):
File "test.py", line 3, in
api = Interface.API(accesskey)
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 348, in init
self.user = UserStatus(self.accesskey)
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 102, in init
self.UpdateFromServer()
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 107, in UpdateFromServer
self.status = GetUserStatus(self.accesskey)
File "D:\Program Files\Python\lib\site-packages\keepaapi-0.12-py3.5.egg\keepaAPI\Interface.py", line 91, in GetUserStatus
raise Exception(scodes[str(status_code)])
Exception: REQUEST_REJECTED
When I submit a product query with offers=20, to obtain new_fba price etc, it might come back with NOT_ENOUGH_TOKEN exception, but I noticed a few issues with the exception handling and retry. Here is API call with offers=20 to retrieve new_fba price (I passed 20 asins into the API call):
ProductQuery(asins, offers=20, history=True)
Here is the log:
Exception2018-09-15 20:46:47,664 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception NOT_ENOUGH_TOKEN in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 255, in ProductQuery raise Exception(scodes[str(status_code)]) Exception: NOT_ENOUGH_TOKEN : Error in thread 2018-09-15 20:46:48,059 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception NOT_ENOUGH_TOKEN in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 255, in ProductQuery raise Exception(scodes[str(status_code)]) Exception: NOT_ENOUGH_TOKEN 2018-09-15 20:47:47,244 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception 'products' in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 247, in ProductQuery for product in response['products']: KeyError: 'products' 2018-09-15 20:47:47,663 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:57} - WARNING - Exception 'products' in thread. Waiting 60 seconds for retry. Traceback (most recent call last): File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 54, in ThreadRequest response = ProductQuery(asins, settings) File "C:\Python27\lib\site-packages\keepaAPI\interface.py", line 247, in ProductQuery for product in response['products']: KeyError: 'products' 2018-09-15 20:47:47,678 - {C:\Python27\lib\site-packages\keepaAPI\interface.py:65} - ERROR - Request for asins [] failed
Thanks
Hi Alex,
For the past couple of days I have been puzzeld by the time some pulls take. I realized that whenever I ask the code to pull a large number of asins (usually > 200) it always takes more tokens than the number of asins. The relation is not clear, sometimes it takes more than double, sometimes less than double.
I can't debug whether the issue comes from the API or there is a problem with the Keepa database.
Not sure if you have the chance to look into that.
edit: if you need a Keepa login to test it I can lend you mine.
Hello,
Few months ago, I had to use keepa in an async loop.
So I forked this project to transform keepa lib into asynckeepa.
I'm wondering how I could merge my work into your project back.
You can check what I did here : https://github.com/alexandriagroup/asynckeepa
It's working very well
I want to contact you, can you leave a phone call?
Hi,
It seems that categories_include and categories_exclude are missing from PRODUCT_REQUEST_KEYS so cannot be included in product_finder commands.
Example:
import keepa
api = keepa.Keepa(accesskey)
product_parms = {'categories_include': ["1055398"]}
products = api.product_finder(product_parms)
File "C:\ProgramData\Anaconda3\lib\site-packages\keepa\interface.py", line 1869, in product_finder
raise RuntimeError('Invalid key "%s"')
I'm guessing this is because 'categories_include' and 'categories_exclude' are missing from product_finder_keys.py, even though they are included in the documentation. Would be great if this could be added. Thanks a lot (and sorry if I missed something - I'm new to Keepa and your program)!
Hello! Thanks for the Python code! Extremely useful.
I have a quick question. I managed successfully to request a product data using the code you provided. I was wondering whether the Python code could as well pull the best sellers (as described in this discussion topic):
https://keepa.com/#!discuss/t/request-best-sellers/1298
Thanks,
volcompt
Hello,
The 'stats' JSON object come out as printed below and I am not sure how to make sense of it. How could I get the 90-day lowest price or 90-day average price from the data below? Thank you!
{'current': [476, 232, 7989, 5966, 604, -1, -1, 603, -1, -1, 940, 15, 1, -1, -1, 17, 45, 317, 476, 8087, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg': [494, 232, 7771, 13718, 628, -1, -1, 606, -1, 228, 939, 16, 1, -1, -1, -1, 45, 311, 477, 7459, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg30': [476, 232, 7989, 10641, 604, -1, -1, 609, -1, -1, 939, 15, 1, -1, -1, -1, 45, 313, 476, 8087, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg90': [494, 232, 7771, 13721, 628, -1, -1, 606, -1, 228, 939, 16, 1, -1, -1, -1, 45, 311, 477, 7459, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'avg180': [477, 232, 7880, 13910, 568, -1, -1, 594, -1, 228, 735, 17, 1, -1, -1, -1, 45, 307, 465, 7660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'atIntervalStart': [381, 232, 7989, 20782, 493, -1, -1, 595, -1, -1, -1, 17, 1, -1, -1, 18, 45, 310, 381, 8087, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'min': [[2245860, 297], [1360680, 82], [3574296, 205], [3130848, 294], [3213538, 297], None, None, [3814028, 441], None, [3527188, 217], [3907932, 400], [3578960, 8], [2944384, 1], None, None, None, [3186826, 45], [3186826, 166], [3227960, 297], [3527188, 217], None, [3227960, 49766], None, None, None, None, None, None, None, None, None, None], 'max': [[4092488, 993], [3540668, 674], [2998914, 94063], [3552686, 37426], [4090582, 993], None, None, [3541902, 788], None, [4083480, 229], [3522240, 1204], [2857422, 30], [4080544, 3], None, None, None, [3224412, 46], [4170676, 317], [4093832, 993], [3647764, 8097], None, [3239770, 58223], None, None, None, None, None, None, None, None, None, None], 'minInInterval': [[4043282, 381], [4043282, 232], [4080544, 216], [4172384, 5415], [4043282, 493], None, None, [4043282, 595], None, [4083480, 229], [4135266, 940], [4102254, 14], [4043282, 1], None, None, None, [4043282, 45], [4116050, 307], [4043282, 381], [4083480, 229], None, [-1, -1], None, None, None, None, None, None, None, None, None, None], 'maxInInterval': [[4092488, 993], [4109716, 427], [4043282, 7989], [4110024, 28882], [4090582, 993], None, None, [4140580, 633], None, [4083480, 229], [4135266, 940], [4049780, 19], [4080544, 3], None, None, None, [4043282, 45], [4170676, 317], [4093832, 993], [4043282, 8087], None, [-1, -1], None, None, None, None, None, None, None, None, None, None], 'outOfStockPercentageInInterval': [0, 0, 0, -1, 0, -1, -1, 0, -1, 93, 71, -1, -1, -1, -1, -1, -1, -1, 8, 0, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'outOfStockPercentage90': [0, 0, 0, -1, 0, -1, -1, 0, -1, 93, 71, -1, -1, -1, -1, -1, -1, -1, 8, 0, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'outOfStockPercentage30': [0, 0, 0, -1, 0, -1, -1, 0, -1, 100, 13, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1], 'stockPerCondition3rdFBA': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'stockPerConditionFBM': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'stockAmazon': -2, 'stockBuyBox': -2, 'retrievedOfferCount': -2, 'totalOfferCount': 16, 'tradeInPrice': -1, 'buyBoxPrice': 476, 'buyBoxShipping': 0, 'lastOffersUpdate': 4172642, 'buyBoxIsUnqualified': False, 'buyBoxIsShippable': True, 'buyBoxIsPreorder': False, 'buyBoxIsFBA': True, 'buyBoxIsAmazon': True, 'buyBoxIsMAP': False, 'buyBoxIsUsed': False, 'isAddonItem': False, 'lightningDealInfo': None, 'sellerIdsLowestFBA': None, 'sellerIdsLowestFBM': ['A2FVWI1N0THHUF'], 'offerCountFBA': 0, 'offerCountFBM': 15}
Dear Alex,
Thank you very much for your helpful guidance to install the module. I was able to follow it. Now, I would like to extract the most recent 365 days for a certain product. I was able to extract the first 10 days or first XX days of price information, but not the most recent ones. Would you be able to help me out with this, please?
Best regards,
nakazas
Looking for support in Python to use Keepa's browse deals API. Anything out there?
I get an key error when using USED_REPLACEMENT_SHIPPING and RATING keys.
Where USED, TRADE_IN keys work as advertised.
Cheers
Zenon
Currently line 83 refers to logging.err('Request failed')
Logging module has no err function, changing it to logging.error('Request failed') fixes this.
I don't know how to submit a pull request otherwise I'd help out.
Dear all,
I have purchased Keepa API and pulled sales rank data via several Asins, However, I found lots of product sales rank data is far ahead of product lauch date( from Amazon site) and review generating date( from Amazon).
Does anyone notice it and can help me figure it out?
for example: for Asin B01GW8YDLK, product Marvel’s Spider Man, Firs release date is September 7, 2018; and First review September 6, 2018 btu the sales rank data starting from 2016-06-14:
Date Salesrank
2016-06-14 -1
2016-06-14 48
2016-06-14 33
2016-06-15 48
2016-06-15 63
2016-06-16 65
2016-06-16 62
2016-06-16 61
2016-06-16 64
2016-06-17 66
2016-06-17 69
...
the same issue happened to B01GW8XOY2, B07DJY81FP etc..
I am think is it preorder? but it is video game product and I am dounting about the preorder could start even 2 years or half years ago?
Wait for your feedback and thank you very much.
Hi again,
thanks for the previous fixes. I noticed couple other things, and I was wondering if they could be fixed as well:
I don't think the stats field working properly ;
for a product the returned avg30 :
'avg30': [18217, 12882, 3548, 39440, 23995, 7027, -1, 16848, -1, -1, -1, 13, 77, -1, 0, -20, 35, 31, 13140, 11494, 7916, 7045, 4016, -1, -1, 7427, -1, -1, -1, -1, 2226],
What's in the csv field? I was expecting to see something like what's described here -https://keepa.com/#!discuss/t/product-object/116
Can these be fixed?
Thank you very much for the effort, this python API is extremely useful =)
how we can perform a deal request ?
Hello,
I've tried executing the brief example. I've tried it on two different machines, 3 different IDEs, with Python 32bit, Anaconda 32bit and 64bit and I always get the same error:
Module 'keepaAPI' has no 'API' member
Any advice?
Thanks!
Hi there,
I have one ASIN ID - B00238TG6Q its the ASIN ID of a mattress which is sold in 4 amazon sites of different counntries (DE, ES, UK, PT) with same asin id. So its difficult to find the price change of the product in one site (ES) as the code gets confused which one to choose,
I am having issues using the 'data' from the product object dict.
I am new to numpy, so I don't even know where to start looking for information. :(
Can you tell me how I can convert the numpy arrays into something I can use? I would love to be able to use the data as a pandas DataFrame, or even a list but it's coming across as a string & I know that there's a better option than building a parser to make it into a list.
Thanks!
Dear all,
I am using keepa API to pull out the sales rank data from keepa. one product sales rank seems wrong.
for example, product( Asin: B00UG9HB1Q) was sold in Amazin since 2018 and the sales rank data start from 2015.
amazon link: https://www.amazon.com/AmazonBasics-Security-Safe-Cubic-Feet/dp/B00UG9HB1Q/ref=cm_cr_arp_d_product_top?ie=UTF8
my code and output:
the sales rank data chart from https://www.profitguru.com/products, which is match with Amazon
anyone can help me on it? thanks.
I encountered an asin (B00NPAJ8L4) where the lowest price is not the buy box price. I believe, as a result, I am not getting the shipping of the lowest priced item added in correctly. Elaborating on the asin above:
B00NPAJ8L4, as of time of posting:
I noticed in the notes of the last release the following line:
"Shipping prices, which previously messed up the data from a product, are now added directly into the price."
This seems to suggest that in cases that lowest isn't buy box that this could occur, but please let me know if it is something I just have missed.
keepa api filters brand/label/manufacturer/publisher/studio using "is one of", so the value for that filtering is a list, not a str. Seem like the code is casting that list into a string, thus returns no result usually. This is also true for all other text fields searching in keepa api, including but not limited to model, size, etc.
Can keepa api get all the asin of the seller?
Simply trying to connect with:
from keepaAPI import Interface
import matplotlib.pyplot as plt
accesskey = 'XXX' # enter real access key here
api = Interface.API(accesskey)
I receive the error:
Traceback (most recent call last):
File "keepa_scrape.py", line 7, in <module>
api = Interface.API(accesskey)
File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 349, in __init__
self.user = UserStatus(self.accesskey)
File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 103, in __init__
self.UpdateFromServer()
File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 108, in UpdateFromServer
self.status = GetUserStatus(self.accesskey)
File "/Library/Python/2.7/site-packages/keepaAPI/Interface.py", line 87, in GetUserStatus
del response['n']
KeyError: 'n'
I am working of mac El-capitan, python 2.7.10 with the installs:
Successfully installed keepaAPI-0.10.1 numpy-1.8.0rc1 requests-2.11.1 six-1.4.1
update Same error in ubuntu 16.04
Hello. Keepa recently added access to the product finder feature to the Java-based API. Has anyone already added this to Python? Any plans to add it to this repository?
Thanks, this is a great project.
Hello, one question puzzled me about how keepa knew the new asin and began to track it. The request is for me. Thank you.
I am seeing csv field value that does not seem to align with the definition defined on keepa API documentation at
For example, for ASIN B00M0QVOOS, here is my code and output:
>>> api = keepaAPI.API(KEEPA_ACCESSKEY)
>>> products = api.ProductQuery('B00M0QVOOS')
>>> products[0]['csv'][11]
[2284199, 9, 2290895, 8, 2292208, 9, 2292988, 8, 2294708, 7, 2295734, 8, 2302437, 9, 2305939, 8, 2311395, 9, 2328132, 10, 2332527, 9, 2336300, 10, 2337449, 8, 2344275, ...
According to keepa API documentation, csv field 11 (index starts at 0) should be COUNT_NEW. A value of 2284199 does not seem to be a valid offer count for NEW condition.
Thanks
It appears that in version 0.14.2, some amazon price and number of sellers are returned as -0.01, whereas in later version 0.15.0 or 0.15.8, these values are turned into nan? The value -0.01 actually does mean Amazon is out of stock, the the item is completely out of stock, vs nan usually means missing value. Can these values be preserved as it is? I believe the issue is with the following code inside ParseCSV
if isfloat: # Convert to float price if applicable
nanmask = values < 0
values = values.astype(np.float)/100
values[nanmask] = np.nan
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.