{
  "openapi": "3.0.1",
  "info": {
    "title": "Product Feed Collector - Affiliate Feeds to One Schema",
    "description": "Merge Daisycon, Awin, TradeTracker, bol partner and Google Shopping feeds (CSV, XML, JSON) into one schema: EAN dedupe, category mapping, price/stock change detection, free 30/90-day price history with drop flag, optional free cross-shop EAN match export, CSV/JSON exports.",
    "version": "1.0",
    "x-build-id": "ObfNj6lrPeVI0xt5K"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/digivibetech~product-feed-collector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-digivibetech-product-feed-collector",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/digivibetech~product-feed-collector/runs": {
      "post": {
        "operationId": "runs-sync-digivibetech-product-feed-collector",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/digivibetech~product-feed-collector/run-sync": {
      "post": {
        "operationId": "run-sync-digivibetech-product-feed-collector",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "feeds": {
            "title": "Product feeds",
            "type": "array",
            "description": "One object per feed: {\"url\": \"...\", \"name\": \"My Awin feed\", \"network\": \"auto|daisycon|awin|tradetracker|bol|google|tradedoubler|cj|admitad|impact|generic\", \"format\": \"auto|csv|xml|json\", \"merchant\": \"Shop name if the feed has none\", \"currency\": \"EUR\", \"fieldMap\": {\"gtin\": \"EAN code\"}}. CSV/TSV, XML (incl. Google Shopping RSS/Atom), JSON and JSON lines, also gzip or zip. Feed URLs are treated as secrets: only masked forms appear in logs and output.",
            "default": []
          },
          "productUrls": {
            "title": "Product pages (direct mode, optional)",
            "type": "array",
            "description": "Public product pages. Only the schema.org Product data (JSON-LD) the shop publishes is read, only when robots.txt allows it, at most one request per 2 seconds per site. Such rows are marked licenceStatus 'needs licence or affiliate approval'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dedupeMode": {
            "title": "Dedupe by EAN/GTIN",
            "enum": [
              "none",
              "perMerchant",
              "onePerGtin"
            ],
            "type": "string",
            "description": "perMerchant keeps the best offer per shop per EAN; onePerGtin keeps the best offer overall (in stock first, then lowest price incl. shipping) and lists the other shops in 'offers'. Rows without a valid EAN are always kept.",
            "default": "none"
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "In delta mode, unchanged products are skipped and not charged, and products that left the feed are listed as 'removed' for free.",
            "default": "all"
          },
          "stateKey": {
            "title": "Delta state name",
            "type": "string",
            "description": "Name for the stored product fingerprints used by delta mode. Use a different name per job. Letters, digits, - and _.",
            "default": "default"
          },
          "crossShopMatch": {
            "title": "Cross-shop match by EAN (free export)",
            "type": "boolean",
            "description": "Group this run's products by valid EAN/GTIN across merchants and save MATCHES.json and MATCHES.csv in the run's key-value store: offer count, cheapest price and merchant, price spread and all offers sorted by price. Invalid or restricted (in-store/coupon) barcodes are left out. Not charged: no extra dataset rows.",
            "default": false
          },
          "categoryMap": {
            "title": "Category mapping",
            "type": "array",
            "description": "Rules applied in order, first match wins: [{\"match\": \"kettle\", \"category\": \"Kitchen > Kettles\"}, {\"match\": \"/lamp|verlichting/\", \"category\": \"Home > Lighting\"}]. Plain text matches anywhere (case-insensitive); /.../ is a regular expression. The result is in 'categoryMapped'.",
            "default": []
          },
          "fieldMap": {
            "title": "Extra column mapping (all feeds)",
            "type": "object",
            "description": "Only needed for unusual column names, e.g. {\"gtin\": \"streepjescode\", \"price\": \"verkoopprijs\"}. Keys: id, title, description, price, sale_price, currency, gtin, brand, images, category, stock, deeplink, merchant, updated, shipping.",
            "default": {}
          },
          "requireGtin": {
            "title": "Only products with a valid EAN/GTIN",
            "type": "boolean",
            "description": "Drop rows without a valid EAN/GTIN (they are not charged).",
            "default": false
          },
          "onlyInStock": {
            "title": "Only products in stock",
            "type": "boolean",
            "description": "Drop rows the feed marks as out of stock (they are not charged).",
            "default": false
          },
          "emitRemoved": {
            "title": "List removed products",
            "type": "boolean",
            "description": "In later runs, add a free 'removed' row for every product that is no longer in the feeds. Skipped automatically when a feed failed.",
            "default": true
          },
          "defaultCurrency": {
            "title": "Default currency",
            "type": "string",
            "description": "Used when neither the feed nor the price says a currency.",
            "default": "EUR"
          },
          "maxItemsPerFeed": {
            "title": "Max rows per feed",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop reading a feed after this many rows.",
            "default": 100000
          },
          "shopId": {
            "title": "Shop id for the Edge.Portal import",
            "type": "string",
            "description": "Optional. Written as shopId on every line of EDGE-PORTAL.ndjson so the import lands in the right shop."
          },
          "defaultLanguage": {
            "title": "Default language",
            "type": "string",
            "description": "BCP-47 language of titles and descriptions when a feed does not set one, e.g. nl-NL.",
            "default": "nl-NL"
          },
          "defaultCountry": {
            "title": "Default country",
            "type": "string",
            "description": "Two-letter country for prices and shipping when a feed does not set one, e.g. NL.",
            "default": "NL"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}