{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Price Tracking API - Prices, Stock and SmartPrice",
    "description": "Competitor price tracking export: latest competitor price, total price and stock per product and domain, ranked against rivals, plus tracked URL detail with last check and price change, products, SmartPrice, brands and categories, from the Prisync API v2. Read only. Bring your own key.",
    "version": "0.1",
    "x-build-id": "t9vQuntMbHw1Elcfg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~competitor-price-tracking-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-competitor-price-tracking-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-tracking-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-competitor-price-tracking-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-tracking-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-competitor-price-tracking-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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "competitorPrices",
              "competitorUrls",
              "products",
              "smartPrices",
              "brands",
              "categories",
              "account"
            ],
            "type": "string",
            "description": "Competitor prices reads, for every product in the account, the latest price, total price and stock at each competitor domain, 100 products per call, and needs nothing else, so it is the default. Competitor URLs reads every tracked product page in full, one call per page, with last check time and last price change. The other modes list products, SmartPrices, brands, categories or the account details.",
            "default": "competitorPrices"
          },
          "productIds": {
            "title": "Product ids",
            "type": "array",
            "description": "Competitor URLs and products only: read just these products, one numeric product id per line, as the products mode lists them. Leave empty to read every product in the account.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Only these brands",
            "type": "array",
            "description": "Competitor prices, competitor URLs and products: keep only products whose brand contains one of these, one per line. Applied to the provider's answer.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Only these categories",
            "type": "array",
            "description": "Competitor prices, competitor URLs and products: keep only products whose category contains one of these, one per line. Applied to the provider's answer.",
            "items": {
              "type": "string"
            }
          },
          "productSearch": {
            "title": "Product name, code or barcode contains",
            "type": "array",
            "description": "Keep only products whose name, product code or barcode contains one of these, one per line. SmartPrices match on product code and barcode only. Applied to the provider's answer.",
            "items": {
              "type": "string"
            }
          },
          "competitorDomains": {
            "title": "Only these competitor domains",
            "type": "array",
            "description": "Competitor prices and competitor URLs: keep only prices from domains that contain one of these, one per line, such as amazon.com or bestbuy.com. Price rank and gap to the lowest still compare against every tracked domain.",
            "items": {
              "type": "string"
            }
          },
          "onlyInStock": {
            "title": "In stock only",
            "type": "boolean",
            "description": "Competitor prices and competitor URLs: keep only prices the provider reports as in stock.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many rows. Competitor prices gives one row per product per competitor domain, so 500 products with 6 competitors each give about 3,000 rows.",
            "default": 1000
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 41,
            "type": "integer",
            "description": "Pacing ceiling for calls to the provider, which allows 2,500 requests per hour per token, about 41 a minute. Competitor URLs makes one call per product and one per tracked page, so it is the mode this matters for.",
            "default": 40
          },
          "apiKey": {
            "title": "API key (account email)",
            "type": "string",
            "description": "Your own API key, shown as API Key on the API access page of your provider account; the provider uses your login email as the API key. This actor is bring-your-own-key and never ships one. Leave blank to use the DATA_API_KEY environment secret instead. It is never written to a row or the log."
          },
          "apiToken": {
            "title": "API token",
            "type": "string",
            "description": "Your own API token, shown beside the API key on the same page. Leave blank to use the DATA_API_TOKEN environment secret instead. It is never written to a row or the log."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}