{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari US Scraper: Listings, Sold Prices",
    "description": "Mercari US scraper for resellers: mercari.com listings and sold items by keyword, category, brand, seller or search link. Rows carry the dollar price, status, condition, size, colour and photos; add sale dates, days to sell, price summaries with a buy price, or a new listing monitor. No login.",
    "version": "0.1",
    "x-build-id": "JTKds5i8E8VuVpW3z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~mercari-us-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-mercari-us-scraper",
        "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/automation_craft~mercari-us-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-mercari-us-scraper",
        "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/automation_craft~mercari-us-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-mercari-us-scraper",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search words as you would type them on Mercari US, for example pokemon card, nike dunk or lululemon. Up to 100 keywords of up to 100 characters each.",
            "items": {
              "type": "string"
            }
          },
          "searchAllListings": {
            "title": "Search every listing",
            "type": "boolean",
            "description": "One search without a keyword: the newest listings of all of Mercari US (with your filters). Not together with keywords, categories, sellers or brands.",
            "default": false
          },
          "usCategoryIds": {
            "title": "Category ids",
            "type": "array",
            "description": "Mercari US category ids (the number in a category link such as www.mercari.com/us/category/796/), for example 796 for video games. Checked against Mercari US's own list of 3,233 categories shipped with this Actor; an id not on it is a free row. Every keyword is searched in every category.",
            "items": {
              "type": "string"
            }
          },
          "splitByDepartment": {
            "title": "Split by department",
            "type": "boolean",
            "description": "Read each search once in each of Mercari US's 17 departments (Women, Men, Electronics, Toys & Collectibles and the rest), each with its own reach of listings. Not together with category ids; at most 100 searches a run, so up to 5 keywords.",
            "default": false
          },
          "searchUrls": {
            "title": "Search links",
            "type": "array",
            "description": "Links copied from www.mercari.com: a search (www.mercari.com/search/?keyword=...), a category page (/us/category/...) or a brand page (/us/brand/...). Each becomes one search with the filters of the link (keyword, category, brand, condition, status, size, free shipping, price, sold time, colour, deals, order). A link with a filter Mercari does not apply for a visitor (coupons, authenticity, shipping fees) is refused with the reason, free. Up to 100 links, each a text or {\"url\": ..., \"label\": ...}.",
            "items": {
              "type": "string"
            }
          },
          "sellerUrls": {
            "title": "Sellers",
            "type": "array",
            "description": "Seller profile links (www.mercari.com/u/<id or username>/) or numeric seller ids: each seller's listings are searched (with your keywords, if any). A username is looked up at Mercari once; an unknown one is a free row. Up to 100 sellers.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Listing links",
            "type": "array",
            "description": "Links to single listings (www.mercari.com/us/item/m.../) or bare listing ids (m...). Each is read with its detail and delivered as given; the search filters do not apply to them. Up to 5,000.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Brand names as Mercari US lists them (Nike, lululemon athletica, Coach) or brand ids (the number in a brand link). A name is matched against Mercari US's own brand list shipped with this Actor (28,853 brands) and used only when exactly one brand carries it; otherwise a free row lists close names. With no keyword, the brands alone are searched.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "On sale, sold, in trade (a listing a buyer paid for whose sale is not yet completed; Mercari marks it sold after the buyer rates it). Default: on sale.",
            "items": {
              "type": "string",
              "enum": [
                "on_sale",
                "sold",
                "trading"
              ],
              "enumTitles": [
                "On sale",
                "Sold",
                "In trade (sold, not yet completed)"
              ]
            }
          },
          "sort": {
            "title": "Order",
            "enum": [
              "newest",
              "best_match",
              "price_low",
              "price_high",
              "oldest",
              "recently_sold"
            ],
            "type": "string",
            "description": "Newest first (the default; the order a monitor reads), best match, price low to high, price high to low, oldest first, or recently sold (sold and in trade listings only, by the moment of the sale). A search of sold or in trade listings only in best match is run as recently sold, the order Mercari applies to it."
          },
          "minPriceUsd": {
            "title": "Minimum price in dollars",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Lowest price in US dollars, up to two decimals."
          },
          "maxPriceUsd": {
            "title": "Maximum price in dollars",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Highest price in US dollars, up to two decimals."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "New, like new, good, fair or poor (Mercari US's own five conditions).",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "like_new",
                "good",
                "fair",
                "poor"
              ],
              "enumTitles": [
                "New",
                "Like new",
                "Good",
                "Fair",
                "Poor"
              ]
            }
          },
          "sizeIds": {
            "title": "Size ids",
            "type": "array",
            "description": "Mercari US size ids (the sizeIds number in a search link), checked against Mercari US's own list of 384 sizes shipped with this Actor.",
            "items": {
              "type": "string"
            }
          },
          "colors": {
            "title": "Colour",
            "type": "array",
            "description": "Mercari US's colours. Mercari matches only listings whose seller set a colour, so a colour search returns fewer listings than the same search without it.",
            "items": {
              "type": "string",
              "enum": [
                "black",
                "grey",
                "white",
                "beige",
                "red",
                "pink",
                "purple",
                "blue",
                "green",
                "yellow",
                "orange",
                "brown",
                "gold",
                "silver"
              ],
              "enumTitles": [
                "Black",
                "Grey",
                "White",
                "Beige",
                "Red",
                "Pink",
                "Purple",
                "Blue",
                "Green",
                "Yellow",
                "Orange",
                "Brown",
                "Gold",
                "Silver"
              ]
            }
          },
          "shippingPayer": {
            "title": "Shipping paid by",
            "enum": [
              "seller",
              "buyer"
            ],
            "type": "string",
            "description": "Seller: free shipping for the buyer (Mercari's own free shipping filter). Buyer: the buyer pays shipping."
          },
          "dealsOnly": {
            "title": "Deals only",
            "type": "boolean",
            "description": "Only listings whose price is below their original price (Mercari's own deals filter; every delivered row is checked for it).",
            "default": false
          },
          "soldWithinDays": {
            "title": "Sold within days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only listings sold within this many days before the run started, by the moment of the sale Mercari keeps. Needs Status set to sold, in trade or both."
          },
          "postedWithinDays": {
            "title": "Posted within days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only listings created within this many days before the run started. Sent to Mercari and checked on every row."
          },
          "excludeKeywords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Leave out listings whose title holds one of these words (each word of it starts a word of the title: lego also leaves out Legoland).",
            "items": {
              "type": "string"
            }
          },
          "onlyTitleMatches": {
            "title": "Only titles with every keyword word",
            "type": "boolean",
            "description": "Only listings whose title holds every word of the keyword (Mercari also matches descriptions and related words).",
            "default": false
          },
          "includePromoted": {
            "title": "Include promoted listings",
            "type": "boolean",
            "description": "Mercari US moves paid promoted listings up the order. Turn off to leave them out (free).",
            "default": true
          },
          "includeDescriptions": {
            "title": "Include descriptions",
            "type": "boolean",
            "description": "Each listing's full description on its row, read from the search itself (no detail read and no extra charge).",
            "default": false
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Read each delivered listing's detail (the Listing detail event): description, likes, shipping payer, fee, class, ships from state and delivery estimate, Buyer Protection fee and total, offers, in carts, Mercari Authenticate, the moment of the sale and days to sell, and the seller's public id, display name, rating with its count, sales count and number of listings. Every filter is checked again on the detail.",
            "default": false
          },
          "priceSummary": {
            "title": "Price summary per search",
            "type": "boolean",
            "description": "One extra row per search (the Price summary event): count, lowest, highest, average and median price, quartiles, the share sold, the median days to sell of listings whose detail was read, and figures per status.",
            "default": false
          },
          "targetMarginPercent": {
            "title": "Target margin for a suggested buy price",
            "minimum": 1,
            "maximum": 95,
            "type": "integer",
            "description": "With a price summary: the suggested highest buy price, the median price of the sold and in trade listings less this percent. A rule of thumb that leaves out fees and shipping."
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Listings delivered (and charged) at most by this run's searches and links. Default 100. A change monitor's re-checks (Check listings the searches no longer show) are bounded by Maximum listing checks instead."
          },
          "maxItemsPerSearch": {
            "title": "Maximum listings per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Listings one search delivers at most (each search, link and seller apart)."
          },
          "maxPagesPerSearch": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Result pages (100 listings each) one search reads at most. Default 10. Mercari US serves 1,000 listings to one search; in the newest and oldest orders this Actor goes on in the next creation time window, so up to 100 pages reach up to 10,000 listings."
          },
          "minSecondsBetweenRequests": {
            "title": "Seconds between requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "A slower pace: at least this many seconds (1 to 5) between two requests, one at a time. Leave it empty for the normal pace (about 0.7 seconds)."
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "A name for this monitor, up to 60 letters, digits, spaces and . _ , - : # ( ). Each run then reads the newest pages, delivers the listings new to it, and pays one Results page event per page read."
          },
          "monitorChanges": {
            "title": "Changes too",
            "type": "boolean",
            "description": "Also deliver listings the monitor delivered before whose price or status changed since, with the previous price and status, the price change and its direction.",
            "default": false
          },
          "monitorDeliverUnchanged": {
            "title": "Unchanged ones too",
            "type": "boolean",
            "description": "With Changes too: also deliver the remembered listings that did not change (marked unchanged); each one delivered is billed as a Listing (and a Listing detail with details).",
            "default": false
          },
          "checkRemovedListings": {
            "title": "Check listings the searches no longer show",
            "type": "boolean",
            "description": "With Changes too: re-read remembered listings on sale or in trade that this run's pages did not show (a Listing check per answered read), to learn whether they sold, changed price or were removed. Each one that sold, changed or was removed is delivered as a row and billed as a Listing (plus a Listing detail with details for a changed one). Bounded by Maximum listing checks, not by Maximum listings.",
            "default": false
          },
          "maxListingChecks": {
            "title": "Maximum listing checks",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Remembered listings re-read at most per run (default 100), the longest unseen first. These re-checks and the rows they deliver do not count toward Maximum listings."
          },
          "resumeFromDatasetId": {
            "title": "Resume from dataset",
            "type": "string",
            "description": "The id of an earlier run's dataset (17 letters and digits, from its Storage tab): the listings in it are not delivered or charged again. Up to 200,000 rows; a dataset that cannot be read refuses the run (only the start fee is charged)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}