{"openapi":"3.0.0","info":{"title":"Mercari Japan Listings and Sellers","version":"1.0.0","description":"Mercari Japan listings, JPY prices, images, item details, seller profiles, categories and search facets, one row per entity."},"servers":[{"url":"https://ah-mercari-com.opendata.best/s/mercari-com"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search Mercari Japan listings, categories, brands and facets","description":"Listing, taxonomy or facet rows by keyword, categoryId, brandId or startUrls.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["auto","search","category","brand","categories","facets"],"description":"Mode. Choose what to collect, or leave auto to select a mode from your target fields. Select categories or facets explicitly; seller mode returns a profile row and available listing rows within the same limit.","default":"auto"},"keyword":{"type":"string","description":"Search keyword. Enter a search word or phrase, such as kindle; use Japanese product names when appropriate. Empty input starts a billed kindle example search capped at 10 rows.","example":"kindle"},"searchQueries":{"type":"array","items":{"type":"string"},"description":"Search queries. Enter a list of search words or phrases. A nonempty list replaces keyword, and each query has its own maxResults allowance."},"startUrls":{"type":"array","items":{"type":"string"},"description":"Start URLs. Enter Mercari Japan search, item, seller profile or category-tree URLs. A category or brand search URL without keyword= lists that page without applying the separate keyword field."},"categoryId":{"type":"string","description":"Category ID. Enter a Mercari category ID. Alone it selects category listings; with a keyword it narrows the search to that category."},"brandId":{"type":"string","description":"Brand ID. Enter a Mercari brand ID. Alone it selects brand listings; with a keyword it narrows the search to that brand."},"sort":{"type":"string","enum":["recommended","created_time_desc","price_asc"],"description":"Sort. Choose recommended order, newest first or lowest price first for listing searches.","default":"recommended"},"status":{"type":"string","description":"Listing status. Filter listing searches by status, such as on_sale or sold_out. Leave empty to avoid selecting a status."},"priceMin":{"type":"number","description":"Min price (JPY). Optional minimum listing price in Japanese yen (JPY)."},"priceMax":{"type":"number","description":"Max price (JPY). Optional maximum listing price in Japanese yen (JPY)."},"itemConditionId":{"type":"string","description":"Item condition ID. Optional Mercari condition ID for listing searches. Leave empty if you do not need a condition filter."},"pageToken":{"type":"string","description":"Page token. Optional search-page token for starting from a later page. Normally leave empty for automatic pagination."},"taxonomyDepth":{"type":"integer","minimum":1,"maximum":4,"description":"Taxonomy depth. Category-tree depth for categories mode, from 1 to 4. The default is 3; maxResults also limits the number of category rows.","default":3},"enrichDetails":{"type":"boolean","description":"Enrich item details. Add item details (items/get), such as description, photos, seller, shipping and category fields, to search, category and brand rows. This is off by default; it updates the same rows without adding a separate row charge.","default":false,"example":false},"useSeedPool":{"type":"boolean","description":"Use recent category data. Allow previously collected category data when it is within seedPoolMaxAgeS. Turn off to request current category data instead.","default":true,"example":true},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"mode":"search","keyword":"kindle","enrichDetails":false,"maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items":{"post":{"operationId":"items","summary":"Mercari item details by itemId or URL","description":"Detailed Mercari Japan item rows for a given itemId or startUrls. Fixed for this endpoint: mode=\"item\".","tags":["items"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"itemId":{"type":"string","description":"Item ID. Enter one item ID, such as m60491956645, from the end of a Mercari Japan item URL."},"startUrls":{"type":"array","items":{"type":"string"},"description":"Start URLs. Enter Mercari Japan search, item, seller profile or category-tree URLs. A category or brand search URL without keyword= lists that page without applying the separate keyword field."},"enrichDetails":{"type":"boolean","description":"Enrich item details. Add item details (items/get), such as description, photos, seller, shipping and category fields, to search, category and brand rows. This is off by default; it updates the same rows without adding a separate row charge.","default":false,"example":false},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"itemId":"m60491956645","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sellers":{"post":{"operationId":"sellers","summary":"Mercari seller profile and listings","description":"Listings and profile rows for a given Mercari sellerId. Fixed for this endpoint: mode=\"seller\".","tags":["sellers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"sellerId":{"type":"string","description":"Seller / user ID. Enter the numeric seller ID from the end of a Mercari Japan user/profile URL."},"startUrls":{"type":"array","items":{"type":"string"},"description":"Start URLs. Enter Mercari Japan search, item, seller profile or category-tree URLs. A category or brand search URL without keyword= lists that page without applying the separate keyword field."},"enrichDetails":{"type":"boolean","description":"Enrich item details. Add item details (items/get), such as description, photos, seller, shipping and category fields, to search, category and brand rows. This is off by default; it updates the same rows without adding a separate row charge.","default":false,"example":false},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).","default":10,"example":3},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"sellerId":"617123334","maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"source":{"nullable":true,"type":"string"},"recordType":{"nullable":true,"type":"string"},"itemId":{"nullable":true,"type":"string"},"sku":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"price":{"nullable":true},"currency":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"},"imageUrl":{"nullable":true,"type":"string"},"images":{"nullable":true,"type":"array","items":{}},"brand":{"nullable":true,"type":"string"},"sellerId":{"nullable":true,"type":"string"},"sellerName":{"nullable":true,"type":"string"},"sellerUrl":{"nullable":true,"type":"string"},"categoryId":{"nullable":true,"type":"string"},"categoryPath":{"nullable":true,"type":"array","items":{}},"availability":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"},"statusRaw":{"nullable":true,"type":"string"},"facetId":{"nullable":true,"type":"string"},"parentFacetId":{"nullable":true,"type":"string"},"searchableValue":{"nullable":true,"type":"string"},"displayNames":{"nullable":true,"type":"object"},"leaf":{"nullable":true,"type":"boolean"},"badges":{"nullable":true,"type":"array","items":{}},"enriched":{"nullable":true,"type":"boolean"},"country":{"nullable":true,"type":"string"},"scrapedAt":{"nullable":true,"type":"string"}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: url, title, price."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"]},"done":{"type":"boolean"},"rowsAvailable":{"type":"integer"},"rowsDelivered":{"type":"integer","description":"Rows already delivered (and billed) to you for this job."},"rowsLimit":{"type":"integer","description":"Most rows this job can deliver."},"estimatedFinishSec":{"type":"integer","description":"While running: estimated seconds until done."},"statusUrl":{"type":"string"},"resultsUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"retentionHours":{"type":"integer"},"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"type":"object","properties":{"offset":{"type":"integer"},"nextOffset":{"type":"integer"},"hasMore":{"type":"boolean"},"rowCount":{"type":"integer"},"rowsBilled":{"type":"integer","description":"Rows delivered by this response."},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row"}},"meta":{"type":"object","additionalProperties":true}}}]},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}}}}}