{
  "openapi": "3.0.1",
  "info": {
    "title": "MarketMage Notebook: Saved Ideas & Seller Profile",
    "description": "The memory of the MarketMage plugin for Claude, kept in your own Apify account: the product ideas you checked with their verdicts and key numbers, versions tried, decisions, linked watchlists, and your seller profile as bands only. Read, export or delete it any time.",
    "version": "0.1",
    "x-build-id": "7FQK3Kefh3gwBSzvJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleanpull~marketmage-notebook/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleanpull-marketmage-notebook",
        "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/cleanpull~marketmage-notebook/runs": {
      "post": {
        "operationId": "runs-sync-cleanpull-marketmage-notebook",
        "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/cleanpull~marketmage-notebook/run-sync": {
      "post": {
        "operationId": "run-sync-cleanpull-marketmage-notebook",
        "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": {
          "operation": {
            "title": "Operation",
            "enum": [
              "read",
              "upsertProfile",
              "addEntry",
              "updateEntry",
              "deleteEntry",
              "deleteAll"
            ],
            "type": "string",
            "description": "What to do. read returns the profile and the entries in one dataset row; every other operation returns the row with what changed. A refused input saves nothing and says why in the row's error.",
            "default": "read"
          },
          "profile": {
            "title": "Seller profile",
            "type": "object",
            "description": "Bands only. budgetBand: under-1k, 1k-5k, 5k-25k or 25k-plus (an exact amount is turned into its band and never stored). fulfilment: dropship, own-stock, fba or print-on-demand. experience: none, some or brand. channels: any of none, store, amazon, tiktok, etsy, ebay, email-list, social. goal: side-income or brand. marketCountry: a two-letter code (US, GB, DE…). Optional: skills (any of ads, content, sourcing, design) and timePerWeek (under-5h, 5-15h, 15-30h, 30h-plus). Fields given replace the stored ones; null clears one. Any other field, an amount of money, an email, a phone number or a key is refused."
          },
          "entry": {
            "title": "Entry",
            "type": "object",
            "description": "kind: idea (a product idea checked), variation (a version of an idea tried: needs parentId and change), decision (what the user decided: decision is pursue, test, park or drop) or watch (a watchlist linked to an idea: needs parentId and watch {actor, taskId, scheduleId, label}). idea: a short label, up to 80 characters; a linked entry (with parentId) keeps none and shows its parent's. Optional: date (YYYY-MM-DD, default today; it cannot change later), marketplace (e.g. amazon.com), verdict (go, maybe, no), confidence (high, medium, low), signals {favours, against, neutral, unknown} as counts, keyNumbers (up to 10 market metrics, numbers only, from: priceMedian, priceP25, priceP75, priceMin, priceMax, medianReviews, under100Reviews, top3SellerShare, sellerCount, listingCount, sponsored, boughtPastMonth, unitsPerMonthMin, unitsPerMonthMax, revenuePerMonthMin, revenuePerMonthMax, bestSellersRank, unitPrice, landedCost, moq, marginPercent, feePercent, trendChangePercent, trendIndex, rating, oneStarShare, tiktokSalesPerDay, adCount; e.g. {\"priceMedian\": 24.99, \"medianReviews\": 1200}), note (up to 300 characters). For updateEntry give only the fields to change (null clears one). Fields outside this list, emails, phone numbers and keys are refused."
          },
          "entryId": {
            "title": "Entry id",
            "type": "string",
            "description": "For updateEntry and deleteEntry: the entry's id as read returns it, for example i-3k9x2a."
          },
          "deleteLinked": {
            "title": "Delete linked entries too",
            "type": "boolean",
            "description": "For deleteEntry: also delete the variations, decisions and watch links of the entry. Off: an entry with linked entries is not deleted.",
            "default": true
          },
          "kinds": {
            "title": "Kinds",
            "type": "array",
            "description": "For read: only these kinds of entry. Empty: all.",
            "items": {
              "type": "string",
              "enum": [
                "idea",
                "variation",
                "decision",
                "watch"
              ]
            },
            "default": []
          },
          "search": {
            "title": "Search",
            "type": "string",
            "description": "For read: only entries whose idea, change, note, marketplace or watch label contains this text (any case), with the entries linked to them."
          },
          "since": {
            "title": "Since",
            "type": "string",
            "description": "For read: only entries dated on or after this day (YYYY-MM-DD)."
          },
          "limit": {
            "title": "Entries returned",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For read: at most this many entries, newest first. The row says how many matched.",
            "default": 50
          },
          "detail": {
            "title": "Detail",
            "enum": [
              "compact",
              "full"
            ],
            "type": "string",
            "description": "For read: compact leaves out the createdAt and updatedAt times; full keeps them (for an export).",
            "default": "compact"
          },
          "startNotebook": {
            "title": "Start the notebook",
            "type": "boolean",
            "description": "Set to true only on the first write after the user asked to keep a notebook: it creates the notebook in their account. Without it, a write to an account with no notebook (never started, or deleted) saves nothing, so a deleted notebook is never brought back by a late or retried call.",
            "default": false
          },
          "confirmDeleteAll": {
            "title": "Confirm: delete the whole notebook",
            "type": "boolean",
            "description": "For deleteAll: must be true. Deletes the profile, every entry and the store itself, for good.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}