{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Best Sellers Scraper + FBA Profit Estimator",
    "description": "Top 100 Amazon best sellers of any category on 8+ Amazon countries: rank, ASIN, title, price, rating, reviews, image. Optional FBA profit, margin, ROI and break-even price from your own fees (always marked estimate). Pay only for delivered products.",
    "version": "0.1",
    "x-build-id": "c2OY8Ef8BN2rozVw5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~amazon-bestsellers-profit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-amazon-bestsellers-profit",
        "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/badr_xba~amazon-bestsellers-profit/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-amazon-bestsellers-profit",
        "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/badr_xba~amazon-bestsellers-profit/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-amazon-bestsellers-profit",
        "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": {
          "categoryUrls": {
            "title": "🏆 Best-seller pages",
            "type": "array",
            "description": "Open a best-seller list on any Amazon country and paste its address, one per line. Examples: <code>https://www.amazon.com/gp/bestsellers/kitchen</code>, <code>https://www.amazon.de/gp/bestsellers/ce-de</code>, <code>https://www.amazon.co.uk/Best-Sellers-Toys-Games/zgbs/kids</code>. New-release lists (/gp/new-releases/...) work too. Each list gives up to 100 products (2 pages).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxProductsPerCategory": {
            "title": "Products per list",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "The top N of each list (rank 1 to N). Amazon shows 100 at most.",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum products in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many products for the whole run (0 = no limit).",
            "default": 0
          },
          "referralFeePercent": {
            "title": "Referral fee (%)",
            "pattern": "^$|^\\d{1,7}([.,]\\d{1,4})?$",
            "type": "string",
            "description": "Amazon referral fee of your category, in % of the selling price (for example 15). You type it: the Actor never invents a fee."
          },
          "fbaFeePerUnit": {
            "title": "FBA fee per unit",
            "pattern": "^$|^\\d{1,7}([.,]\\d{1,4})?$",
            "type": "string",
            "description": "Your FBA fulfilment fee per unit, in the currency of the Amazon country (for example 3.86 on amazon.com)."
          },
          "unitCost": {
            "title": "Purchase cost per unit",
            "pattern": "^$|^\\d{1,7}([.,]\\d{1,4})?$",
            "type": "string",
            "description": "What one unit costs you, in the currency of the Amazon country. Same value for every product of the run."
          },
          "unitCostPercent": {
            "title": "Purchase cost (% of price)",
            "pattern": "^$|^\\d{1,7}([.,]\\d{1,4})?$",
            "type": "string",
            "description": "Or a sourcing assumption: the purchase cost as a % of each selling price (for example 25). Used when no unitCost is given."
          },
          "unitCostsByAsin": {
            "title": "Purchase cost by ASIN",
            "type": "object",
            "description": "Exact costs for some products: {\"B0XXXXXXXX\": 4.20}. They win over the two fields above."
          },
          "inboundShippingPerUnit": {
            "title": "Shipping to Amazon per unit",
            "pattern": "^$|^\\d{1,7}([.,]\\d{1,4})?$",
            "type": "string",
            "description": "Optional, per unit."
          },
          "otherCostsPerUnit": {
            "title": "Other costs per unit",
            "pattern": "^$|^\\d{1,7}([.,]\\d{1,4})?$",
            "type": "string",
            "description": "Optional (packaging, prep, ads...), per unit."
          },
          "runTag": {
            "title": "Run tag",
            "maxLength": 100,
            "type": "string",
            "description": "Optional label copied to every row."
          },
          "failRunOnError": {
            "title": "Fail the run on input errors",
            "type": "boolean",
            "description": "Off: wrong inputs are listed in FAILED_INPUTS (never billed) and the run ends SUCCEEDED. On: the run ends FAILED.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default Apify proxy is used (the RESIDENTIAL group is not used: its cost is included in the per-product price). Your own proxy URLs work too. A list Amazon refuses is listed in FAILED_INPUTS and never billed.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}