中規模な情報の取得(Medium)

広告

「Medium」は「Small」に加えて画像や販売に関する情報を追加して取得できるように設定されたグループです。実際に記述する場合は次のようにします。

ResponseGroup=Medium

では実際に試してみます。

http://ecs.amazonaws.jp/onca/xml?
Service=AWSECommerceService
&AWSAccessKeyId=[AccessKey]
&Version=2009-07-01
&Operation=ItemSearch
&SearchIndex=Books
&Keywords=終の住処 磯崎 憲一郎
&ResponseGroup=Medium

※必要に応じてURLエンコードして下さい。

上記のようなリクエストを送信した場合に取得できる情報は次の通りです。

<?xml version="1.0" ?>
<ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-07-01">
  <OperationRequest>
    <HTTPHeaders>
      <Header Name="UserAgent" Value="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)" />
    </HTTPHeaders>
    <RequestId>e7d8eee0-8b38-4d1c-a2cc-15534192a947</RequestId>
    <Arguments>
      <Argument Name="Operation" Value="ItemSearch" />
      <Argument Name="Service" Value="AWSECommerceService" />
      <Argument Name="AWSAccessKeyId" Value="(key)" />
      <Argument Name="Timestamp" Value="2009-07-24T16:03:47.000Z" />
      <Argument Name="Signature" Value="NExcoJSLTA8HDXpyOAq4h5pg1HVs/31/sWE7CnwR8T8=" />
      <Argument Name="ResponseGroup" Value="Medium" />
      <Argument Name="SearchIndex" Value="Books" />
      <Argument Name="Version" Value="2009-07-01" />
      <Argument Name="Keywords" Value="終の住処 磯崎 憲一郎" />
    </Arguments>
    <RequestProcessingTime>0.0328090000000000</RequestProcessingTime>
  </OperationRequest>
  <Items>
    <Request>
      <IsValid>True</IsValid>
      <ItemSearchRequest>
        <Condition>New</Condition>
        <DeliveryMethod>Ship</DeliveryMethod>
        <Keywords>終の住処 磯崎 憲一郎</Keywords>
        <MerchantId>Amazon</MerchantId>
        <ResponseGroup>Medium</ResponseGroup>
        <ReviewSort>-SubmissionDate</ReviewSort>
        <SearchIndex>Books</SearchIndex>
      </ItemSearchRequest>
    </Request>
    <TotalResults>1</TotalResults>
    <TotalPages>1</TotalPages>
    <Item>
      <ASIN>410317711X</ASIN>
      <DetailPageURL>http://www.amazon.co.jp/%E7%B5%82%E3%81%AE%E4%BD%8F%E5%87%A6-%E7%A3%AF%E5%B4%8E-%E6%86%B2%E4%B8%80%E9%83%8E/dp/410317711X%3FSubscriptionId%3D1SM7CKHWKSJKJFPKBA02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D410317711X</DetailPageURL>
      <ItemLinks>
        <ItemLink>
          <Description>Add To Wishlist</Description>
          <URL>http://www.amazon.co.jp/gp/registry/wishlist/add-item.html%3Fasin.0%3D410317711X%26SubscriptionId%3D1SM7CKHWKSJKJFPKBA02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D5143%26creativeASIN%3D410317711X</URL>
        </ItemLink>
        <ItemLink>
          <Description>Tell A Friend</Description>
          <URL>http://www.amazon.co.jp/gp/pdp/taf/410317711X%3FSubscriptionId%3D1SM7CKHWKSJKJFPKBA02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D5143%26creativeASIN%3D410317711X</URL>
        </ItemLink>
        <ItemLink>
          <Description>All Customer Reviews</Description>
          <URL>http://www.amazon.co.jp/review/product/410317711X%3FSubscriptionId%3D1SM7CKHWKSJKJFPKBA02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D5143%26creativeASIN%3D410317711X</URL>
        </ItemLink>
        <ItemLink>
          <Description>All Offers</Description>
          <URL>http://www.amazon.co.jp/gp/offer-listing/410317711X%3FSubscriptionId%3D1SM7CKHWKSJKJFPKBA02%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D5143%26creativeASIN%3D410317711X</URL>
        </ItemLink>
      </ItemLinks>
      <SalesRank>50</SalesRank>
      <SmallImage>
        <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL75_.jpg</URL>
        <Height Units="pixels">75</Height>
        <Width Units="pixels">51</Width>
      </SmallImage>
      <MediumImage>
        <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL160_.jpg</URL>
        <Height Units="pixels">160</Height>
        <Width Units="pixels">108</Width>
      </MediumImage>
      <LargeImage>
        <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL.jpg</URL>
        <Height Units="pixels">500</Height>
        <Width Units="pixels">337</Width>
      </LargeImage>
      <ImageSets>
        <ImageSet Category="primary">
          <SwatchImage>
            <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL30_.jpg</URL>
            <Height Units="pixels">30</Height>
            <Width Units="pixels">20</Width>
          </SwatchImage>
          <SmallImage>
            <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL75_.jpg</URL>
            <Height Units="pixels">75</Height>
            <Width Units="pixels">51</Width>
          </SmallImage>
          <ThumbnailImage>
            <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL75_.jpg</URL>
            <Height Units="pixels">75</Height>
            <Width Units="pixels">51</Width>
          </ThumbnailImage>
          <TinyImage>
            <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL110_.jpg</URL>
            <Height Units="pixels">110</Height>
            <Width Units="pixels">74</Width>
          </TinyImage>
          <MediumImage>
            <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL._SL160_.jpg</URL>
            <Height Units="pixels">160</Height>
            <Width Units="pixels">108</Width>
          </MediumImage>
          <LargeImage>
            <URL>http://ecx.images-amazon.com/images/I/51%2B53Z66tiL.jpg</URL>
            <Height Units="pixels">500</Height>
            <Width Units="pixels">337</Width>
          </LargeImage>
        </ImageSet>
        <ImageSet Category="variant">
          <SwatchImage>
            <URL>http://ecx.images-amazon.com/images/I/51Pv8R6D3QL._SL30_.jpg</URL>
            <Height Units="pixels">30</Height>
            <Width Units="pixels">20</Width>
          </SwatchImage>
          <SmallImage>
            <URL>http://ecx.images-amazon.com/images/I/51Pv8R6D3QL._SL75_.jpg</URL>
            <Height Units="pixels">75</Height>
            <Width Units="pixels">50</Width>
          </SmallImage>
          <ThumbnailImage>
            <URL>http://ecx.images-amazon.com/images/I/51Pv8R6D3QL._SL75_.jpg</URL>
            <Height Units="pixels">75</Height>
            <Width Units="pixels">50</Width>
          </ThumbnailImage>
          <TinyImage>
            <URL>http://ecx.images-amazon.com/images/I/51Pv8R6D3QL._SL110_.jpg</URL>
            <Height Units="pixels">110</Height>
            <Width Units="pixels">73</Width>
          </TinyImage>
          <MediumImage>
            <URL>http://ecx.images-amazon.com/images/I/51Pv8R6D3QL._SL160_.jpg</URL>
            <Height Units="pixels">160</Height>
            <Width Units="pixels">107</Width>
          </MediumImage>
          <LargeImage>
            <URL>http://ecx.images-amazon.com/images/I/51Pv8R6D3QL.jpg</URL>
            <Height Units="pixels">500</Height>
            <Width Units="pixels">334</Width>
          </LargeImage>
        </ImageSet>
      </ImageSets>
      <ItemAttributes>
        <Author>磯崎 憲一郎</Author>
        <Binding>単行本</Binding>
        <EAN>9784103177111</EAN>
        <ISBN>410317711X</ISBN>
        <Label>新潮社</Label>
        <ListPrice>
          <Amount>1260</Amount>
          <CurrencyCode>JPY</CurrencyCode>
          <FormattedPrice>¥ 1,260</FormattedPrice>
        </ListPrice>
        <Manufacturer>新潮社</Manufacturer>
        <NumberOfPages>142</NumberOfPages>
        <PackageDimensions>
          <Height Units="hundredths-inches">79</Height>
          <Length Units="hundredths-inches">748</Length>
          <Weight Units="hundredths-pounds">57</Weight>
          <Width Units="hundredths-inches">496</Width>
        </PackageDimensions>
        <ProductGroup>Book</ProductGroup>
        <ProductTypeName>ABIS_BOOK</ProductTypeName>
        <PublicationDate>2009-07-24</PublicationDate>
        <Publisher>新潮社</Publisher>
        <Studio>新潮社</Studio>
        <Title>終の住処</Title>
      </ItemAttributes>
      <OfferSummary>
        <LowestNewPrice>
          <Amount>1260</Amount>
          <CurrencyCode>JPY</CurrencyCode>
          <FormattedPrice>¥ 1,260</FormattedPrice>
        </LowestNewPrice>
        <LowestUsedPrice>
          <Amount>1250</Amount>
          <CurrencyCode>JPY</CurrencyCode>
          <FormattedPrice>¥ 1,250</FormattedPrice>
        </LowestUsedPrice>
        <TotalNew>2</TotalNew>
        <TotalUsed>2</TotalUsed>
        <TotalCollectible>0</TotalCollectible>
        <TotalRefurbished>0</TotalRefurbished>
      </OfferSummary>
    </Item>
  </Items>
</ItemSearchResponse>

画像や販売価格も含めた情報について取得したい時に利用します。

( Written by Tatsuo Ikura )