{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Shopping Results Tracker: Products, Shops & Your Brand Rank",
    "description": "Asks shopping prompts to OpenAI with web search, ChatGPT-style, and returns products, prices, shops, links, cited sources and your brand's position. Inputs: prompts, datasetId, fileUrl, trackBrands. $0.05 per answer, only when it returns. Agent-ready: x402, MCP.",
    "version": "0.1",
    "x-build-id": "yb7TIbP3kRNf2Bzvu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nerolabs~ai-shopping-results-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nerolabs-ai-shopping-results-tracker",
        "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/nerolabs~ai-shopping-results-tracker/runs": {
      "post": {
        "operationId": "runs-sync-nerolabs-ai-shopping-results-tracker",
        "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/nerolabs~ai-shopping-results-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-nerolabs-ai-shopping-results-tracker",
        "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": {
          "prompts": {
            "title": "Shopping prompts",
            "type": "array",
            "description": "The questions a shopper would ask an AI assistant, one per line, for example 'best running shoes for flat feet'. Each prompt is answered with OpenAI's web search and charged once when an answer comes back. Or use a dataset or file below.",
            "items": {
              "type": "string"
            }
          },
          "trackBrands": {
            "title": "Brands or shops to look for",
            "type": "array",
            "description": "Your brand, product, shop or website (and your competitors'), for example 'Dyson' or 'argos.co.uk'. Each row reports whether it appears, at what product position, as a shop, or as a cited source. Optional.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "An Apify dataset with one prompt per row, for example a keyword list. Every original column is kept and the AI shopping results are added alongside. Use the picker rather than typing an ID."
          },
          "fileUrl": {
            "title": "File or Google Sheet URL",
            "type": "string",
            "description": "A public link to a CSV, TSV, Excel, JSON or JSON Lines file with one prompt per row. A normal Google Sheets link works: share it as 'Anyone with the link can view'. Used when no dataset is given."
          },
          "fileFormat": {
            "title": "File format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xlsx"
            ],
            "type": "string",
            "description": "Leave on 'Detect automatically' unless the link has no file extension and the server reports the wrong content type.",
            "default": "auto"
          },
          "sheetName": {
            "title": "Excel sheet name",
            "type": "string",
            "description": "Which sheet to read from an Excel workbook. Defaults to the first sheet."
          },
          "data": {
            "title": "Rows",
            "type": "array",
            "description": "Rows as inline JSON, an alternative to a dataset or file. Each object needs a field holding the prompt."
          },
          "promptField": {
            "title": "Prompt field",
            "type": "string",
            "description": "The column that holds the prompt. Leave empty to detect it (prompt, query, question, keyword and similar names)."
          },
          "brandField": {
            "title": "Brand field",
            "type": "string",
            "description": "Optional column holding brands or shops to look for on that row only (comma separated), added to the list above."
          },
          "country": {
            "title": "Shopper country",
            "type": "string",
            "description": "Two-letter country code the shopper is in (US, GB, DE, AU and so on), so search results, shops and currency fit that country. A row's own 'country' column overrides it. Default US.",
            "default": "US"
          },
          "city": {
            "title": "Shopper city",
            "type": "string",
            "description": "Optional city for local results, for example 'London'."
          },
          "region": {
            "title": "Shopper region",
            "type": "string",
            "description": "Optional state or region, for example 'California'."
          },
          "shoppingInstructions": {
            "title": "Answer like a shopping assistant",
            "type": "boolean",
            "description": "On: the model is told to recommend named products with prices and shops, like ChatGPT's shopping answers. Off: the prompt is answered with no extra instruction (one web search).",
            "default": true
          },
          "answersPerPrompt": {
            "title": "Answers per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers vary. Ask each prompt up to 5 times to see how often your brand appears. Each answer is charged.",
            "default": 1
          },
          "includeAnswerText": {
            "title": "Include the full answer text",
            "type": "boolean",
            "description": "Keep the full written answer on each row.",
            "default": true
          },
          "monitor": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Remember each prompt's result and report what changed since the last run (your brand appearing, dropping out or moving position, new products recommended). Run it on a schedule. The first run just records the starting point. Off by default.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Names the saved memory for monitor mode, so different watchlists do not mix. Use the same name on every scheduled run of one watchlist. Default: 'default'."
          },
          "keep": {
            "title": "Which rows to keep",
            "enum": [
              "all",
              "found",
              "missing",
              "changed"
            ],
            "type": "string",
            "description": "Filtering happens after each prompt is answered and charged. 'Only changed answers' is the monitor-mode alert list.",
            "default": "all"
          },
          "keepOriginalFields": {
            "title": "Keep my original columns",
            "type": "boolean",
            "description": "Keep every column from the input row next to the results, so they line up with your own data.",
            "default": true
          },
          "concurrency": {
            "title": "Prompts at a time",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many prompts are answered in parallel.",
            "default": 3
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "A hard ceiling on how many rows are read from the input, as a safety net on a large dataset."
          },
          "exportFormats": {
            "title": "Export files",
            "type": "array",
            "description": "Also write the results as a downloadable CSV or Excel file, linked from the run's output. $0.01 per file, charged only when the run answered at least one prompt.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ],
              "enumTitles": [
                "CSV",
                "Excel (xlsx)"
              ]
            },
            "default": []
          },
          "outputDatasetName": {
            "title": "Append to named dataset",
            "type": "string",
            "description": "Also append every kept row to a named dataset that persists across runs, for example a history of checks. Not charged again."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST the run summary to this URL when the run finishes, for Slack, Zapier, Make, n8n or your own API. In monitor mode it is sent only when something changed. Charged $0.01 only on a confirmed 2xx response."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}