{"openapi":"3.0.0","info":{"title":"Rakuten Japan Products Shops and Rankings","version":"1.0.0","description":"Rakuten Ichiba Japan products, JPY prices, shop details, category rankings, taxonomy and reviews, one row per entity."},"servers":[{"url":"https://ah-rakuten-com.opendata.best/s/rakuten-com"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search Rakuten Ichiba products, rankings and categories","description":"Product, ranking, taxonomy or keyword suggestion rows across Rakuten Ichiba Japan.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["auto","search","ranking","categories","suggest"],"description":"Mode. Choose what to collect, or leave auto to select from the fields you fill. Ranking and category modes need no keyword; review mode needs an item or shop. genreId narrows the selected mode.","default":"auto","example":"auto"},"keyword":{"type":"string","description":"Search keyword. Search word or phrase for search or suggestion mode. Japanese keywords are recommended.","example":"水筒"},"searchQueries":{"type":"array","items":{"type":"string"},"description":"Search queries. Several keywords at once. Each keyword gets its own maxResults row allowance."},"startUrls":{"type":"array","items":{"type":"string"},"description":"Start URLs. Rakuten Ichiba search, item, shop, ranking or review page addresses, including shop and item pages on a shop's own subdomain (<shop>.rakuten.co.jp). Each address selects its page type and has its own maxResults allowance."},"genreId":{"type":"string","description":"Genre ID. Rakuten genre identifier, such as 564500 for smartphones and tablets. Narrows search, ranking or category mode; does not select a mode by itself."},"genreSlug":{"type":"string","description":"Genre slug / Japanese name. Recognized genre name or alias, such as smartphone. Used when genreId is empty; a known numeric genreId is more precise."},"sort":{"type":"string","description":"Sort. Search result order: standard, price_asc, price_desc, newest, review_count or review_score. Leave empty for the site order."},"minPrice":{"type":"integer","minimum":0,"description":"Min price (JPY). Minimum listed price in JPY for search results. Leave empty for no minimum."},"maxPrice":{"type":"integer","minimum":0,"description":"Max price (JPY). Maximum listed price in JPY for search results. Leave empty for no maximum."},"filters":{"type":"array","items":{"type":"string"},"description":"Facet filters. Search filters: free_shipping, super_deal, student, subscription or include_sold_out. Availability depends on the search page."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag filters. Tag identifiers from a Rakuten search page. Leave empty if you do not need tag filtering."},"used":{"type":"integer","minimum":0,"maximum":1,"description":"Used flag. Optional used-item setting from the search page: 0 or 1. Availability depends on the page."},"period":{"type":"string","enum":["daily","realtime","weekly","monthly"],"description":"Ranking period. Ranking period: daily, realtime, weekly or monthly. Used in ranking mode.","default":"daily","example":"daily"},"page":{"type":"integer","minimum":1,"maximum":150,"description":"Start page. First search result page to collect, starting at 1.","default":1,"example":1},"maxGenreNodes":{"type":"integer","minimum":1,"maximum":5000,"description":"Max genre nodes. Limit category exploration in categories mode. maxResults separately limits the rows delivered.","default":800},"enrichDetails":{"type":"boolean","description":"Enrich item details. Add available item-page details to product listings. May increase run time.","default":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":{"keyword":"水筒","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":"Rakuten product details or reviews","description":"Item detail or review rows by itemUrl or shopUrlCode + manageNumber.","tags":["items"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["item","review"],"description":"Mode. Choose what to collect, or leave auto to select from the fields you fill. Ranking and category modes need no keyword; review mode needs an item or shop. genreId narrows the selected mode.","default":"item","example":"auto"},"itemUrl":{"type":"string","description":"Item URL. One item page address, e.g. https://item.rakuten.co.jp/<shop>/<item>/ or https://<shop>.rakuten.co.jp/item/<item>/"},"shopUrlCode":{"type":"string","description":"Shop URL code. Shop code from the shop address, e.g. rakutenmobile-store in https://www.rakuten.co.jp/rakutenmobile-store/. Alone it lists the shop; with a manage number it opens one item."},"manageNumber":{"type":"string","description":"Manage number. Item code from the final part of an item page address. Use with shopUrlCode to select one item."},"shopId":{"type":"string","description":"Shop ID. Numeric Rakuten shop identifier. Selects a shop for shop or review mode; use with itemId to select one item."},"itemId":{"type":"string","description":"Item ID. Numeric Rakuten item identifier. Use with shopId to select one item for item or review mode."},"startUrls":{"type":"array","items":{"type":"string"},"description":"Start URLs. Rakuten Ichiba search, item, shop, ranking or review page addresses, including shop and item pages on a shop's own subdomain (<shop>.rakuten.co.jp). Each address selects its page type and has its own maxResults allowance."},"enrichDetails":{"type":"boolean","description":"Enrich item details. Add available item-page details to product listings. May increase run time.","default":false},"enrichReviews":{"type":"boolean","description":"Enrich reviews. Request available full-text reviews as separate billed rows. Review rows and product rows share the same maxResults allowance; a complete review history is not guaranteed.","default":false},"enrichStock":{"type":"boolean","description":"Enrich real-time stock. Request available stock and variant information for items. These details may be missing.","default":false},"enrichShipping":{"type":"boolean","description":"Enrich shipping. Request available item shipping fees and delivery estimates. These details may be missing.","default":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":{"mode":"item","shopUrlCode":"atlas-online","manageNumber":"awsl","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/shops":{"post":{"operationId":"shops","summary":"Rakuten shop catalog by shopUrlCode","description":"Shop profile and product rows for a Rakuten Ichiba shopUrlCode. Fixed for this endpoint: mode=\"shop\".","tags":["shops"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"shopUrlCode":{"type":"string","description":"Shop URL code. Shop code from the shop address, e.g. rakutenmobile-store in https://www.rakuten.co.jp/rakutenmobile-store/. Alone it lists the shop; with a manage number it opens one item."},"startUrls":{"type":"array","items":{"type":"string"},"description":"Start URLs. Rakuten Ichiba search, item, shop, ranking or review page addresses, including shop and item pages on a shop's own subdomain (<shop>.rakuten.co.jp). Each address selects its page type and has its own maxResults allowance."},"page":{"type":"integer","minimum":1,"maximum":150,"description":"Start page. First search result page to collect, starting at 1.","default":1,"example":1},"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":{"shopUrlCode":"book","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":{"rowType":{"nullable":true,"type":"string","description":"Entity type: product, review, shop, category or suggestion."},"id":{"nullable":true,"type":"string","description":"Stable identifier within rowType."},"reviewId":{"nullable":true,"type":"string"},"sourceReviewId":{"nullable":true,"type":"string"},"reviewIndex":{"nullable":true,"type":"integer"},"productId":{"nullable":true,"type":"string"},"productName":{"nullable":true,"type":"string"},"productUrl":{"nullable":true,"type":"string"},"text":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"recordType":{"nullable":true,"type":"string"},"itemId":{"nullable":true,"type":"string"},"manageNumber":{"nullable":true,"type":"string"},"shopUrlCode":{"nullable":true,"type":"string"},"shopId":{"nullable":true,"type":"string"},"shopName":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"price":{"nullable":true},"currency":{"nullable":true,"type":"string"},"shippingPrice":{"nullable":true},"shippingIncluded":{"nullable":true,"type":"boolean"},"pointCount":{"nullable":true},"reviewScore":{"nullable":true},"reviewCount":{"nullable":true},"reviewUrl":{"nullable":true,"type":"string"},"reviewSnippets":{"nullable":true,"type":"array","description":"Older output may contain this list. Current output delivers available snippets as separate review rows.","items":{}},"imageUrl":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"},"originalItemUrl":{"nullable":true,"type":"string"},"genreId":{"nullable":true,"type":"string"},"genreIds":{"nullable":true,"type":"array","items":{}},"tags":{"nullable":true,"type":"array","items":{}},"superDeal":{"nullable":true,"type":"boolean"},"rankingRank":{"nullable":true},"country":{"nullable":true,"type":"string"},"scrapedAt":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"stockQuantity":{"nullable":true,"type":"integer"},"stockSource":{"nullable":true,"type":"string"},"variantStock":{"nullable":true,"type":"object"},"variantCount":{"nullable":true,"type":"integer"},"isSoldOut":{"nullable":true,"type":"boolean"},"canBuy":{"nullable":true,"type":"boolean"},"canReserve":{"nullable":true,"type":"boolean"},"deliveryScheduleText":{"nullable":true,"type":"string"},"shippingFee":{"nullable":true},"shippingText":{"nullable":true,"type":"string"},"expectedDeliveryDate":{"nullable":true,"type":"string"},"points":{"nullable":true},"spuEligible":{"nullable":true,"type":"boolean"},"gtin13":{"nullable":true,"type":"string"},"availability":{"nullable":true},"shop39":{"nullable":true,"type":"boolean"},"hometownTax":{"nullable":true,"type":"boolean"},"usedCondition":{"nullable":true,"type":"string"},"pointMultiplier":{"nullable":true},"priceMin":{"nullable":true},"priceMax":{"nullable":true},"genrePath":{"nullable":true,"type":"array","items":{}},"preRank":{"nullable":true},"engine":{"nullable":true,"type":"string"},"rating":{"nullable":true,"type":"number"},"reviewTitle":{"nullable":true,"type":"string"},"postDate":{"nullable":true,"type":"string"},"orderDate":{"nullable":true,"type":"string"},"nickname":{"nullable":true,"type":"string"},"ageRange":{"nullable":true,"type":"string"},"sex":{"nullable":true,"type":"string"},"helpfulCount":{"nullable":true,"type":"integer"},"skuInfo":{"nullable":true},"media":{"nullable":true,"type":"array","items":{}},"reviewKind":{"nullable":true,"type":"string","description":"Review target: item (product review) or shop (shop review).","enum":["item","shop"]},"companyName":{"nullable":true,"type":"string"},"tel":{"nullable":true,"type":"string"},"phoneKind":{"nullable":true,"type":"string","description":"Structural classification of the Japanese telephone numbering prefix only: ip_050 (050), tollfree_0120 (0120/0800), geographic_or_mobile (other domestic prefixes) or absent. Does not identify the carrier or call forwarding.","enum":["ip_050","tollfree_0120","geographic_or_mobile","absent"]},"fax":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"businessHours":{"nullable":true,"type":"string"},"holidays":{"nullable":true,"type":"string"},"licenses":{"nullable":true,"type":"array","items":{}},"disclosureStates":{"nullable":true,"type":"object"},"keyword":{"nullable":true,"type":"string"},"suggestionType":{"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: id; rowType=product: id, title, url, 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"}}}}}}