Skip to content

Instantly share code, notes, and snippets.

{
"href": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=0696580589792&limit=50&filter=conditionIds%3A%7B1000%7D%2CbuyingOptions%3A%7BFIXED_PRICE%7D%2CitemLocationCountry%3AGB%2CdeliveryCountry%3AGB%2CsellerAccountTypes%3A%7BBUSINESS%7D%2CmaxDeliveryCost%3A0&offset=0",
"total": 35,
"limit": 50,
"offset": 0,
"itemSummaries": [
{
"itemId": "v1|166031549255|0",
"title": "Korg - EXP2 Foot Controller for MIDI Keyboard",
"leafCategoryIds": [
{
"error": false,
"status": 200,
"response": {
"href": "https://api.ebay.com/buy/browse/v1/item_summary/search?q=6943478034204&limit=50&filter=conditionIds%3A%7B1000%7D%2CbuyingOptions%3A%7BFIXED_PRICE%7D%2CitemLocationCountry%3AGB%2CdeliveryCountry%3AGB%2CsellerAccountTypes%3A%7BBUSINESS%7D&offset=0",
"total": 3,
"limit": 50,
"offset": 0,
"itemSummaries": [
{
def run(d, meta_keys_list: list, alternative_filter_keys: list = None):
db_connector.connect()
try:
# Build filter conditions based on provided keys
conditions = False
if alternative_filter_keys:
conditions = [getattr(Product, key) == d[key] for key in alternative_filter_keys if key in d]
if conditions:
product_row = db_connector.session.query(Product).filter(and_(*conditions)).first()
products_query = db_connector.session.query(
DataFeedEbay.legacyitemid,
DataFeedEbay.categoryid.label('categoryid'),
DataFeedEbay.id.label('datafeed_id'),
Product.id.label('product_id'),
Product.description,
Product.in_stock_status,
Product.product_slug_new
).join(
Product,
[
{
"itemId": "v1|325681931382|0",
"title": "Greak: Memories of Azur Sony PlayStation 5 PS5 Platform Game NEW & SEALED",
"leafCategoryIds": [
"139973"
],
"categories": [
{
"categoryId": "139973",
{
"itemId":"v1|314932142361|0",
"title":"PS5 - Rustler - PlayStation 5 Brand New Sealed",
"leafCategoryIds":[
"139973"
],
"categories":[
{
"categoryId":"139973",
"categoryName":"Video Games"
{
"error": false,
"isGroup": false,
"response": {
"additionalImages": [
{
"height": 1200,
"imageUrl": "https://i.ebayimg.com/images/g/uOcAAOSwMEZmItGk/s-l1600.jpg",
"width": 1600
},
[
{
"details": {
"pack_quantity": "1",
"design": "Railroad tie",
"product_length": "600mm",
"product_thickness": "15mm",
"product_width": "250mm",
"product_shape": "Rectangular",
"surface_finish": "Textured"