From a brand name to 2nd STREET API search results
A brand workflow takes three calls:
- Look the brand up in the dictionary by its Latin name or katakana reading and keep the
idof the row you want; NIKE, for instance, is 001106. - Send that id in
body.brandto the facets call first. Its reply tells you how many pieces match and how they split by condition, size and colour, so you can decide whether to narrow the query before reading any rows. Size ids from thesizesbuckets go straight intobody.size. - Then run the search with the same filters.
Keeping the filters identical between the two calls matters, because the facet total describes exactly that filter set, and a search with other filters reports the total of its own filter set.
Paging through Japanese results
Japanese search results come 60 rows to a page, and asking for a larger page has no effect. To read a result set:
- Start at page 1 and keep
body.sortfixed while paging, because changing the order between pages mixes two different sequences. - Increase
body.pageuntil a page comes back with no rows: the page after the last one is empty and never repeats earlier rows, so an emptyitemslist is the signal to stop.
Dividing total by 60 and rounding up gives the number of pages; a query with 103,034 matches, for example, ends on page 1,718, which holds 14 rows. The default recommended order is reproducible, so repeated identical calls return the same rows in the same order, and the arrival order puts the newest pieces first.
Walking a US collection past the keyword cap
On the US web store, a collection walk avoids the 1,000-result ceiling of keyword search, which otherwise ends a large query at page 28 with a stop_reason saying the cap was reached. The walk works like this:
- Start with the categories call and
body.marketset to us. It lists collections 250 per page, withbody.pagemoving through them, and collections come with ahandlesuch as new-arrivals or nike-1. - Pass that handle in
body.collectionof a search on the same market. The walk reads the collection in pages whose sizebody.per_pagesets. - Add
body.available_onlyto keep only the pieces the store will ship now.
Rows from a collection walk carry tags, which include the branch name, and compare_at_price_usd, and keyword rows print neither.
From a prefecture to a shop and its stock
To work with one region, call the shop list with body.prefecture as one code string, such as 13 for Tokyo, and optionally body.name to narrow the list by part of the Japanese shop name. Every entry carries a shop_id, which serves two calls:
- send it as
body.shop_idto the shop record call for the address, hours, coordinates and the goods the branch handles - or put it in the
body.shoparray of a search to list what the branch has on sale
Mind the difference in shape: the shop list takes a single prefecture code as a string, while search and facets take their prefecture input as an array, so several prefectures can be combined in one query, which widens the match rather than narrowing it.
Reading prices, discounts and shipping
Japanese prices are whole yen with tax included, so price_jpy compares directly with the yen bounds in body.price_min and body.price_max without any conversion. A product record adds original_price_jpy, the price before a markdown, and discount_pct. When a piece has an individual delivery cost, shipping_jpy is null; handle that as an individual delivery cost rather than as free delivery, and use shipping_kind to tell it apart from the flat fee.
US prices appear twice, as price_usd in dollars and price_minor in cents. They are the same amount, so pick one representation and keep it, and send dollars with decimals in body.us_price_min and body.us_price_max. In measurements_cm, a measurement that was not taken is left out, so a missing key means no figure rather than zero.
Watching a piece until it sells
To follow individual pieces, store the goods_id from each search row and request the product record for it later. The product call accepts the bare id or the product page address, and the shop part of that address can be dropped. While the piece is listed, the record shows whether it can be bought online and whether it can be moved to another branch.
Once a piece has sold, its id is answered as not found rather than with a record, which lets a watcher close the entry. To find fresh stock instead, body.new_arrivals_only limits a search to pieces marked as new arrivals, and each row also shows is_new_arrival, so a scheduled search picks up pieces as they are added.
How 2nd STREET works
2nd STREET buys items from customers for cash on the spot and resells them in its stores and through its online shop. It runs several store formats: total reuse shops that carry everything from luxury brands to furniture and appliances, apparel reuse shops for clothing, bags and shoes, and used select shops focused on popular brands in city districts such as Shibuya and Harajuku.
Goods are also bought by mail and through home visits. The Japanese online store sells only to buyers with a Japanese address, so overseas shoppers submit a product page address to a buying service in Japan that purchases and ships the item.
[
{
"body": {
"keyword": "NIKE",
"min_count": 1
}
},
{
"body": {
"brand": ["001106"]
}
},
{
"body": {
"brand": ["001106"],
"condition": ["A"],
"sort": "cost-low"
}
}
][
{
"body": {
"market": "us",
"page": 1
}
},
{
"body": {
"market": "us",
"collection": "new-arrivals",
"per_page": 250,
"available_only": true
}
}
][
{
"body": {
"prefecture": "13"
}
},
{
"body": {
"shop_id": "30251"
}
},
{
"body": {
"shop": ["30251"],
"page": 1
}
}
]Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/secondstreet/post-2ndstreet-brands' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"keyword":"ナイキ"}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
2nd STREET API: Japanese second-hand goods and shops overview and prices · Read the API reference · Try it in the playground