Item Search
bonsaiben edited this page Jun 18, 2012
·
5 revisions
Rakuten Market Item Search API
Rakumarket.item_search "roomba"
Rakumarket.item_search "roomba", :price => {:maximum => 30000}
:affiliate_id => 'affiliate_id'
:call_back => 'call_back'
:shop_code => 'shop_code'
:genre_id => 'genre_id'
:items_per_page => 30
:page => 1`
:order => 'attribute asc|desc'
where attribute
is one of affiliate_rate
, review_count
, review_average
, price
, updated_at
:price => {:minimum => 0}
currency is Japanese yen
:price => {:maximum => 10000}
currency is Japanese yen
:must_be_available => false|true
:deep_search => false|true
:mobile => false|true
:must_have_image => false
:or_search => false|true
:exclude_keyword => 'keyword'
:include_genre_info => false|true
:purchase_type => 'normal'|'regular'|'distribution'
:shipping => {:must_ship_international => false|true}
:shipping => {:country => 'country name'}
where country name
is one of these
:shipping => {:must_ship_next_day => false|true}
:shipping => {:next_day_area => 'area name'}
where area name
is one of these
:shipping => {:must_include_cost => false|true}
:must_have_point_multiplication => false|true
:point_multiplication_factor => false|true
:must_accept_credit_cards => false|true
The returned response is a Hashie::Mash, a hash with method-like accessors for hash keys.
$ response = Rakumarket.item_search "roomba"
$ response.keys
=> ["count", "page", "first_page", "last_page", "items_per_page", "mobile?", "page_count", "items"]
$ response.items.size
=> 30
$ response.items.first.keys
=> ["catchcopy", "shipping", "shop", "name", "code", "price", "caption", "url", "affiliate_url", "has_image?", "small_image_url", "medium_image_url", "available?", "tax_included?", "credit_cards_accepted?", "shop_of_the_year?", "affiliate_rate", "start_time", "end_time", "review_count", "review_average", "point_multiplication_factor", "point_multiplication_start_time", "point_multiplication_end_time", "genre_id"]
$ response.items.first.name
=> "【現定数在庫有り】ルンバ 530 新品 楽天最安挑戦価格 安心の3年保証 オマケ付き ルンバ530 ホワイト iRobot Roomba 正規品 【c_1011】【2sp_120528_b】"