{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Price Tracking API - Daily Price and Stock History",
    "description": "Competitor price tracking for your own products: daily price history with every competitor domain's price and stock status, your own price and price position, cheapest competitor and price gap, plus product feed settings, from the PriceShape REST API. Read only. Bring your own key.",
    "version": "0.1",
    "x-build-id": "vg9JHhDFG2r1LdTK7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~competitor-price-history-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-competitor-price-history-api",
        "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/nabeelbaghoor~competitor-price-history-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-competitor-price-history-api",
        "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/nabeelbaghoor~competitor-price-history-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-competitor-price-history-api",
        "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": {
          "service": {
            "title": "What to read",
            "enum": [
              "feeds",
              "productHistory",
              "feed"
            ],
            "type": "string",
            "description": "Product feeds lists every feed your token can read and needs nothing else, which is where the feed id for price history comes from, so it is the default. Competitor price and stock history reads, per product and per day, your own price beside every competitor domain's price and stock. One product feed reads the settings of the feed ids you give.",
            "default": "feeds"
          },
          "identifiers": {
            "title": "Product UPIs or feed ids",
            "type": "array",
            "description": "One per line. For price history, the UPI (Unique Product Identifier) of each product, which is the GTIN, SKU, MPN, id or URL depending on the feed's UPI type shown by the product feeds service. For one product feed, the feed's priceshapeId. The product feeds service reads none.",
            "items": {
              "type": "string"
            }
          },
          "feedId": {
            "title": "Feed id",
            "type": "string",
            "description": "Price history only, and required there: the priceshapeId of the feed the products belong to, as listed by the product feeds service."
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Price history only: the first day of the period, as YYYY-MM-DD. Left blank, the provider uses its own default window of roughly the last 90 days."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Price history only: the last day of the period, as YYYY-MM-DD. Left blank, the provider uses today."
          },
          "timezone": {
            "title": "Timezone",
            "type": "string",
            "description": "Price history only: the IANA timezone the period is read in, such as Europe/Copenhagen or UTC. Left blank, the provider uses your account's timezone, otherwise UTC."
          },
          "rowPer": {
            "title": "One row per",
            "enum": [
              "productDay",
              "vendorPrice"
            ],
            "type": "string",
            "description": "Price history only. Product per day gives one row per product and date with every competitor price nested under vendors and the cheapest competitor and price gap computed. Competitor price per day gives one flat row per competitor domain per product and date, which is easier to chart or load into a spreadsheet.",
            "default": "productDay"
          },
          "vendorDomains": {
            "title": "Only these competitor domains",
            "type": "array",
            "description": "Price history only: keep only competitors whose domain is listed, one per line, such as amazon.de. Applied to the provider's answer; a product day with none of these competitors is left out.",
            "items": {
              "type": "string"
            }
          },
          "inStockOnly": {
            "title": "Competitors in stock only",
            "type": "boolean",
            "description": "Price history only: keep only competitor prices whose stock status reads as in stock. Applied to the provider's answer.",
            "default": false
          },
          "draft": {
            "title": "Draft feeds",
            "enum": [
              "false",
              "true"
            ],
            "type": "string",
            "description": "Product feeds only: the provider's draft parameter. False, its default, reads active feeds; true asks for draft feeds, which are inactive and receive no imports.",
            "default": "false"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. A year of daily history for one product is up to 365 rows, or several times that with one row per competitor price.",
            "default": 1000
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Pacing ceiling for calls to the provider. Rate limited answers are retried after a pause.",
            "default": 60
          },
          "apiKey": {
            "title": "API token",
            "type": "string",
            "description": "Your own API token, generated under account settings in your provider portal, with read access to feeds and to products. This actor is bring-your-own-key and never ships one. Leave blank to use the DATA_API_KEY environment secret instead. It is sent as a bearer token and never written to a row or the log."
          },
          "apiVersion": {
            "title": "API version",
            "type": "string",
            "description": "The value of the X-API-Version header every request must carry. The provider names versions by release month.",
            "default": "2026-02"
          },
          "baseUrl": {
            "title": "API base URL",
            "type": "string",
            "description": "Override the host the actor calls. Only useful for testing against a different environment."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}