{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan to eBay Price Gap — Mercari & Yahoo! Auctions vs eBay",
    "description": "What a product really sold for in Japan (recent sold prices on Mercari and Yahoo! Auctions: median and range) next to what it is listed for on eBay (official Browse API, your keys), in JPY, with the gap after shipping and eBay fees. Figures, cards, cameras. No login.",
    "version": "0.1",
    "x-build-id": "YnC9EmKhedgJDfddS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northbell~japan-ebay-price-gap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northbell-japan-ebay-price-gap",
        "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/northbell~japan-ebay-price-gap/runs": {
      "post": {
        "operationId": "runs-sync-northbell-japan-ebay-price-gap",
        "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/northbell~japan-ebay-price-gap/run-sync": {
      "post": {
        "operationId": "run-sync-northbell-japan-ebay-price-gap",
        "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",
        "required": [
          "searches"
        ],
        "properties": {
          "searches": {
            "title": "Searches",
            "type": "array",
            "description": "One product per line: the Japanese words for Yahoo! Auctions, then | and the English words for eBay, e.g. \"ねんどろいど 初音ミク | nendoroid hatsune miku\". Without the | part the same words go to both.",
            "items": {
              "type": "string"
            }
          },
          "japanSites": {
            "title": "Sold prices in Japan from",
            "type": "array",
            "description": "Where to read recent sold prices. Both by default; the gap uses the median of all sold items together.",
            "items": {
              "type": "string",
              "enum": [
                "yahoo",
                "mercari"
              ],
              "enumTitles": [
                "Yahoo! Auctions (ヤフオク)",
                "Mercari Japan (メルカリ)"
              ]
            },
            "default": [
              "yahoo",
              "mercari"
            ]
          },
          "excludeWords": {
            "title": "Leave out titles with these words",
            "type": "array",
            "description": "Items whose title contains any of these words are left out on both sites, so junk, parts and bundles do not move the median (any case). E.g. ジャンク (junk), まとめ (lot), 部品取り (for parts), lot, broken.",
            "items": {
              "type": "string"
            }
          },
          "ebayClientId": {
            "title": "eBay Client ID (App ID)",
            "type": "string",
            "description": "From your free eBay developer account (developer.ebay.com > Application Keys > Production). eBay is read only through its official Browse API with your own keys."
          },
          "ebayClientSecret": {
            "title": "eBay Client Secret (Cert ID)",
            "type": "string",
            "description": "The Production Cert ID of the same app. Stored encrypted by Apify; used only to get a read-only token for the Browse API."
          },
          "ebayMarketplace": {
            "title": "eBay marketplace",
            "enum": [
              "EBAY_US",
              "EBAY_GB",
              "EBAY_DE",
              "EBAY_FR",
              "EBAY_IT",
              "EBAY_ES",
              "EBAY_AU",
              "EBAY_CA"
            ],
            "type": "string",
            "description": "Where you would sell. Prices are converted to JPY at the European Central Bank reference rate of the day.",
            "default": "EBAY_US"
          },
          "ebayCondition": {
            "title": "eBay condition",
            "enum": [
              "any",
              "used",
              "new"
            ],
            "type": "string",
            "description": "Compare with used or new listings only. Fixed-price listings only (no auctions still running).",
            "default": "any"
          },
          "shippingJpy": {
            "title": "Shipping to the buyer (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Your cost to ship one item abroad. 3,000 is a placeholder for a small parcel; set your own.",
            "default": 3000
          },
          "ebayFeePercent": {
            "title": "eBay fees (% of the sale)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Final value fee plus anything else eBay takes, as a share of the sale price. 13.25 is eBay.com's rate for most categories; check yours.",
            "default": 13.25
          },
          "otherCostJpy": {
            "title": "Other costs per item (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Anything else per item: a proxy or forwarding fee, packing, Yahoo! Auctions shipping inside Japan, payment fees.",
            "default": 0
          },
          "maxSoldPerSearch": {
            "title": "Max sold items per search and site (Japan)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Most recent sold items to read per Japanese site for the median (Yahoo! Auctions 50 a page, Mercari 120 a page).",
            "default": 50
          },
          "maxEbayPerSearch": {
            "title": "Max eBay listings per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "eBay listings to read for the median (one API call).",
            "default": 50
          },
          "compareWithLastRun": {
            "title": "Compare with my last run",
            "type": "boolean",
            "description": "Keep each search's medians in your own storage and, from the second run of the same search, show how the Japanese sold median, the eBay median and the gap moved since then (lastRunAt, japanSoldMedianChangeJpy, ebayMedianChangeJpy, gapChangeJpy).",
            "default": true
          },
          "includeItems": {
            "title": "Include every item",
            "type": "boolean",
            "description": "Also return each sold item and each eBay listing as its own row (type yahooSold / ebayListing). Off = only one comparison row per search.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}