Documentation
2nd STREET API reference
Reference for the 2nd STREET API: what the 8 operations do with their inputs, and what the returned brand, category, item and shop fields mean.
See also: 2nd STREET API: Japanese second-hand goods and shops overview and prices · 2nd STREET API guide: brands, paging and shop lookups
On this page
Japan and US storefronts in the 2nd STREET API
body.market selects which storefront a call reads. With jp it reads the Japanese chain, whose prices are whole yen with tax included; with us it reads the United States web store, whose prices are dollars with cents. The operations do not cover both sides equally.
The brand dictionary, facet counts, shop list and shop record read Japan only, while type-ahead suggestions read the US store only, so a suggestion call has to send us explicitly. Categories and search work on both sides but return different structures: a category tree with filter lists in Japan, and store collections in the US. Most search filters belong to one side only, which is why a Japanese filter such as a brand id has no counterpart on the US store.
Fields in this section (1)
body.market
Brand dictionary: post-2ndstreet-brands
The brand dictionary lists the brands 2nd STREET Japan files its stock under. body.keyword turns it into a look-up that matches either the katakana reading or the Latin name, so the reading of NIKE also returns NIKE ACG and NIKE SB, each with its own count. Brands with no pieces in stock remain in the dictionary with a count of zero, and body.min_count removes the brands below the count you set.
body.limit and body.offset move through the dictionary in slices. In data, total_brands is the size of the dictionary, matched the number of brands the look-up kept and returned the number of rows in this reply.
Each row in brands holds the id that the search brand filter takes, brand in Latin script, brand_kana in katakana, count and the brand's url. The chain's other-brands bucket, id 999999, works as a search filter but does not appear in this list.
Fields in this section (5)
post-2ndstreet-brands, body.keyword, body.min_count, body.limit, body.offset
Category tree and US collections: post-2ndstreet-categories
For Japan, the call returns the category tree with the item count the chain publishes for every node. body.category cuts the reply down to one node and its children, and body.depth decides how many levels are included, from the departments alone to the full three levels.
A node in categories carries id, name, count, url and children. data also holds:
total_goods,total_shopsandnew_goods_todayfor the catalogueprefectureswithcode,nameandarea_id- the sales
areas colors, the 23-colour palette whose ids the colour filter takes
For the US store data holds collections instead, and body.page steps through them 250 at a time. A collection comes with id, handle, title and url, along with published_at and updated_at.
A handle goes into the collection input of search. products_count is the figure the store prints for a collection; it is not a measure of how many rows a search over that collection returns.
Fields in this section (4)
post-2ndstreet-categories, body.category, body.depth, body.page
Facet counts: post-2ndstreet-facets
Facet counts describe a Japanese query before any rows are read. The operation accepts the same filters as a Japanese search, without paging, sorting and the shorthand switches, and returns total, the number of matching pieces, with filters_applied and a facets block. Inside that block:
brandsandcategoriespair ids with acount; resolve those ids with the brand dictionary and the category treecolorsadds the chain's Japanese colour name to each idconditionsgives eachgradewith its Japaneselabelsizesgives each size id with thelabelthe index publishes, such as XXS, L or 28cm; those size ids are the values the size filter of search expects
The new-or-unused grade appears here as S; send it to search as NS. Comparing the total before and after adding a filter shows how far that filter narrows a query.
Fields in this section (5)
post-2ndstreet-facets, body.keyword, body.size, body.color, body.condition
Product record: post-2ndstreet-product
body.goods_id takes the Japanese 13-digit goods id or the address of the product page. The shop id inside such an address is not needed, because the goods id alone identifies the piece. On the US store the product handle is used, and there it is the same 13-digit id.
A Japanese id that is not numeric is refused. The record groups its fields like this:
- Identity of the piece:
goods_id,url,title,title_parts,brandandbrand_id - Prices:
price_jpy,original_price_jpyanddiscount_pct - Shipping:
shipping_jpy, null for an individual delivery cost, andshipping_kind - Condition:
condition,condition_gradeandcondition_note - Attributes:
size,color,material,pattern,model_number, the whole detail table asspecsand measurements inmeasurements_cm - Classification:
category_id,category_path,breadcrumbandsuggested_gender - Saves and photos:
favouritesandimages
available_online shows whether the page offers a cart and store_transfer whether it offers a transfer to another branch, while shop names the branch holding the piece with its address, opening hours, buy-back hours and parking spaces. A sold piece is answered as not found instead of with the shop page its address then shows. US records give the price in dollars and in cents, the availability, the branch name taken from the product tags, and the size, colour, material and condition table the store writes into the description.
Fields in this section (2)
post-2ndstreet-product, body.goods_id
Item search in Japan: post-2ndstreet-search
In Japan a search page holds 60 rows whatever page size is requested, and the result set has no ceiling: paging can continue to the last page, and the page after the last one is empty rather than a repeat. Leaving out body.sort keeps the chain's recommended order. The filters work as follows:
body.keywordmatches brand, item name and product code regardless of letter case, and katakana and Latin spellings are separate queries- several
body.brandids match any of them, and an unknownbody.categoryid returns no rows body.new_arrivals_only,body.discounted_onlyandbody.store_transfer_onlyare shorthands for the flag codes nflg, dflg and bflgbody.price_minandbody.price_maxare whole yen, the same unit as the tax-includedprice_jpyof each rowbody.conditiontakes the grades A, B, C and D and NS for new or unused pieces, which is also accepted as S
Besides items, data reports page, per_page, returned and total. It also reports pages_estimate, result_cap, filters_applied, heading and stop_reason. Each Japanese row gives:
- The piece:
goods_id,url,title,title_partsandbrand - The branch:
shop_id, the branch that physically holds the piece - Size and condition:
size,conditionandcondition_grade - Price:
price_jpy,price_display,price_tax_basis,currencyanddiscount_pct - Markers and picture:
is_new_arrival,labelsandimage_url
Fields in this section (12)
post-2ndstreet-search, body.page, body.sort, body.new_arrivals_only, body.discounted_only, body.store_transfer_only, body.price_min, body.price_max, body.condition, body.keyword, body.brand, body.category
Item search on the US store: post-2ndstreet-search
A US keyword search returns 36 rows a page and stops at 1,000 results, which is page 28; a large query ends with stop_reason reporting that the cap was reached. body.collection takes a collection handle from the categories call and reads that collection instead of the keyword search, which removes the 1,000-result cap and lets body.per_page choose the page size; outside a collection walk the page size stays fixed. Page 150 of a collection walk is refused.
Collection rows add tags, which carry the branch name, and compare_at_price_usd. body.available_only keeps the pieces the store will ship now, and body.us_price_min and body.us_price_max filter in dollars with cents. US rows carry product_id, handle, sku, price_usd and price_minor instead of the yen and shop fields.
They also carry available, product_type and shop_tag. Sorting on the US store offers relevance and the two price orders only.
Fields in this section (6)
post-2ndstreet-search, body.collection, body.per_page, body.available_only, body.us_price_min, body.us_price_max
Shop record: post-2ndstreet-store
body.shop_id takes the 5-digit shop id that the shop list and the Japanese search rows provide, or the address of the shop's page. The record returns the branch as its own page presents it:
- Names and type:
house_name,shop_nameandshop_type, for example a total reuse shop or a buy-back-only shop - Duty-free status:
tax_free - Description and contact:
description,addressandphone - Hours:
opening_hours,buyback_hours, andvisit_buyback_hourswhere the branch buys at customers' homes - Location:
latitudeandlongitudefrom the map on the page,area,prefectureandparking_spaces - Other page fields:
buyback_queue_note,imagesandfields_raw
The handles block holds two lists, sells and buys_back, because the goods a branch sells and the goods it buys back are not the same list. Sending the same shop_id to the shop filter of search lists what that branch has on sale, which turns a shop record into a starting point for browsing one location.
Fields in this section (2)
post-2ndstreet-store, body.shop_id
Shop list: post-2ndstreet-stores
Without inputs, the shop list returns the chain's shop entries together with the lists that describe its network:
prefectureswithcode,name,area_idandtax_free_shops- the sales
areaswithidandname cities, keyed by prefecture
body.prefecture narrows the reply to the shops of one prefecture; it takes a single code, from 01 for Hokkaido through 13 for Tokyo to 47 for Okinawa, while the prefecture filter of search takes an array of codes. body.name keeps the shops whose Japanese name contains the text, for example the name of a district.
total_shops_published is the network size the chain states, and shops_listed counts the entries in its list, which include a few placeholders for shops that are not trading; both are returned so that neither figure replaces the other. Each entry in shops carries shop_id, shop_name, house_name and url, and the shop_id feeds both the shop record call and the shop filter of search.
Fields in this section (3)
post-2ndstreet-stores, body.prefecture, body.name
Type-ahead suggestions: post-2ndstreet-suggest
Suggestions come from the US web store's own type-ahead, so the call needs body.market set to us; for Japanese brands, the keyword look-up of the brand dictionary serves the same purpose. body.keyword is the text a shopper has typed so far, and body.limit sets how many entries of each kind come back. data holds three lists:
productsgives each suggested item withproduct_id,handle,url,title,brand,product_type,price_usd,price_minor,available,image_urlandattributes, which is the size, colour, material and condition table the store writes into its descriptioncollectionsgivesid,handle,titleandurl, and ahandlecan be passed to the collection input of searchqueriesgives alternative search phrases astextwith the matchingurl
price_minor is the same price as price_usd, expressed in cents, so a client can keep integer amounts without converting.
Fields in this section (4)
post-2ndstreet-suggest, body.keyword, body.limit, body.market
{
"body": {
"goods_id": "2319227341949"
}
}Operations
Every public gateway operation uses POST /api/v1/{project}/{action}.
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.
Brand dictionary
POST /api/v1/secondstreet/post-2ndstreet-brands
Lists 2nd STREET Japan brands with Latin and katakana spellings, filter ids and item counts, with an optional look-up by reading.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.keyword | string | Optional | — | — | — |
body.limit | integer | Optional | 200 | — | 1–2000 |
body.market | string | Optional | "jp" | "jp""us" | — |
body.min_count | integer | Optional | 0 | — | 0–9007199254740991 |
body.offset | integer | Optional | 0 | — | 0–9007199254740991 |
Request examples
# 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":"ナイキ"}}'Category tree
POST /api/v1/secondstreet/post-2ndstreet-categories
Returns the Japanese category tree with item counts and the lists the search filters use, or the US store's collections with their handles.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.category | string | Optional | — | — | — |
body.depth | integer | Optional | 3 | — | 1–3 |
body.market | string | Optional | "jp" | "jp""us" | — |
body.page | integer | Optional | 1 | — | 1–40 |
Request examples
# 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-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"market":"jp"}}'Facet counts
POST /api/v1/secondstreet/post-2ndstreet-facets
Counts the Japanese pieces that match a query and breaks the total down by brand, category, colour, condition grade and size.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.brand | string[] | Optional | — | — | — |
body.category | string | Optional | — | — | — |
body.color | string[] | Optional | — | — | — |
body.condition | string[] | Optional | — | — | — |
body.flag | string[] | Optional | — | — | — |
body.keyword | string | Optional | — | — | — |
body.market | string | Optional | "jp" | "jp""us" | — |
body.prefecture | string[] | Optional | — | — | — |
body.price_max | integer | Optional | — | — | 0–9007199254740991 |
body.price_min | integer | Optional | — | — | 0–9007199254740991 |
body.shop | string[] | Optional | — | — | — |
body.size | string[] | Optional | — | — | — |
Request examples
# 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-facets' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"keyword":"ナイキ"}}'Product detail
POST /api/v1/secondstreet/post-2ndstreet-product
Reads one piece by goods id or product page address, with its price, condition, shipping and the branch that holds it.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.goods_id | string | Required | — | — | — |
body.market | string | Optional | "jp" | "jp""us" | — |
Request examples
# 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-product' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"goods_id":"2319227341949"}}'Item search
POST /api/v1/secondstreet/post-2ndstreet-search
Searches second-hand pieces in Japan or on the US web store with filters, sort orders and paging.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.available_only | boolean | Optional | false | — | — |
body.brand | string[] | Optional | — | — | — |
body.category | string | Optional | — | — | — |
body.collection | string | Optional | — | — | — |
body.color | string[] | Optional | — | — | — |
body.condition | string[] | Optional | — | "A""B""C""D""NS" | — |
body.discounted_only | boolean | Optional | false | — | — |
body.flag | string[] | Optional | — | "nflg""dflg""bflg" | — |
body.keyword | string | Optional | — | — | — |
body.market | string | Optional | "jp" | "jp""us" | — |
body.new_arrivals_only | boolean | Optional | false | — | — |
body.page | integer | Optional | 1 | — | 1–50000 |
body.per_page | integer | Optional | 60 | — | 1–250 |
body.prefecture | string[] | Optional | — | — | — |
body.price_max | integer | Optional | — | — | 0–9007199254740991 |
body.price_min | integer | Optional | — | — | 0–9007199254740991 |
body.shop | string[] | Optional | — | — | — |
body.size | string[] | Optional | — | — | — |
body.sort | string | Optional | "recommend" | "recommend""arrival""cost-low""cost-high""discount-high" | — |
body.store_transfer_only | boolean | Optional | false | — | — |
body.us_price_max | number | Optional | — | — | ≥ 0 |
body.us_price_min | number | Optional | — | — | ≥ 0 |
Request examples
# 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-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"keyword":"ナイキ"}}'Shop record
POST /api/v1/secondstreet/post-2ndstreet-store
Reads one Japanese branch with its address, hours, coordinates and the goods it sells and buys back.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.shop_id | string | Required | — | — | — |
body.market | string | Optional | "jp" | "jp""us" | — |
Request examples
# 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-store' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"shop_id":"30251"}}'Shop list
POST /api/v1/secondstreet/post-2ndstreet-stores
Lists the Japanese shop network or the shops of one prefecture, together with prefecture, area and city lists.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.market | string | Optional | "jp" | "jp""us" | — |
body.name | string | Optional | — | — | — |
body.prefecture | string | Optional | — | — | — |
Request examples
# 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-stores' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"prefecture":"13"}}'Type-ahead suggestions
POST /api/v1/secondstreet/post-2ndstreet-suggest
Returns the US web store's product, collection and search-phrase suggestions for a partly typed keyword.
Input fields
| Field | Type | Required | Default | Allowed values | Limits |
|---|---|---|---|---|---|
body.keyword | string | Required | — | — | — |
body.limit | integer | Optional | 6 | — | 1–10 |
body.market | string | Optional | "jp" | "jp""us" | — |
Request examples
# 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-suggest' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"keyword":"nike","market":"us"}}'How calls work
POST /api/v1/secondstreet/<action>withx-api-key,Content-Type: application/jsonand a requiredIdempotency-Key.- A successful call returns
ok: true:datais the result of the operation,meta.requestIdidentifies the recorded request andmeta.chargedCreditUnitsis the amount charged. Otherwiseokisfalseanderror.codenames the reason; readokanderror.coderather than relying on the HTTP status alone. Every gateway reply carries a request id for support:meta.requestId, or a top-levelrequestIdin a reply withoutmeta(such as a refusal before admission). - Charged the listed price only when a call succeeds. Failures are not charged; an unconfirmed outcome is released after at most 900 seconds without a charge.
- Repeating the same request with the same Idempotency-Key after it has finished returns the stored response for 24 hours without a new charge.
In the gateway reference: