restaurant-search について
`hpp`コマンドラインとHotPepper Gourmet APIで日本の飲食店を探すためのスキルです。場所、人数、料理ジャンル、予算、設備の希望を検索条件に整理し、結果を表にまとめます。
主な機能
- 01エリアとジャンルコードの解決
- 02場所または座標での検索
- 03予算と設備による絞り込み
- 04検索結果の表形式表示
- 05コマンドライン引数での再検索
活用シーン
- 01駅周辺の飲食店探し
- 02個室のある団体向け店舗探し
- 03料理ジャンルと価格帯での絞り込み
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ jackchuka/ skills --skill restaurant-searchインストール後、Claude Code で/restaurant-searchを入力して読み込まれたか確認します。
詳細
Restaurant Search
Find Japanese restaurants using the hpp CLI (HotPepper Gourmet API).
https://github.com/jackchuka/hpp
Prerequisites
hppCLI installed andHOTPEPPER_API_KEYenv var set
Workflow
1. Parse the request
Extract from the user's request:
- Location: Station name, area name, or coordinates
- Party size: Number of people (maps to
--party-capacity) - Day/time: Determines which restaurants are open (check
open/closefields) - Genre preference: e.g., izakaya, Chinese, Italian (maps to
--genre) - Budget: Price range (maps to
--budget) - Features: Private rooms (
--private-room), non-smoking (--non-smoking), WiFi (--wifi), free drink (--free-drink), etc. - Keywords: Free text like "ramen", "sushi" (maps to
--keyword)
2. Resolve the area code
The API requires area codes, not free-text location names. Resolve the location:
hpp area small --keyword "<location-name>"
This returns small area codes (e.g., X085 for 浜松町) along with parent middle/large area codes.
If no small area matches, try middle area:
hpp area middle --keyword "<location-name>"
If the user provides coordinates (lat/lng), skip area lookup and use --lat, --lng, --range instead.
3. Resolve genre codes (if needed)
If the user requests a specific cuisine type:
hpp genre
Common genre codes:
| Code | Genre |
|---|---|
| G001 | 居酒屋 |
| G002 | ダイニングバー・バル |
| G003 | 創作料理 |
| G004 | 和食 |
| G005 | 洋食 |
| G006 | イタリアン・フレンチ |
| G007 | 中華 |
| G008 | 焼肉・ホルモン |
| G009 | アジア・エスニック |
| G010 | 各国料理 |
| G011 | カラオケ・パーティ |
| G012 | バー・カクテル |
| G013 | ラーメン |
| G014 | カフェ・スイーツ |
| G016 | お好み焼き・もんじゃ |
| G017 | 韓国料理 |
If unsure, run hpp genre to get the full list.
4. Resolve budget codes (if needed)
If the user specifies a budget:
hpp budget
Common budget codes:
| Code | Range |
|---|---|
| B001 | ~1500円 |
| B002 | 2001~3000円 |
| B003 | 3001~4000円 |
| B008 | 4001~5000円 |
| B004 | 5001~7000円 |
| B005 | 7001~10000円 |
| B006 | 10001~15000円 |
| B012 | 15001~20000円 |
| B013 | 20001~30000円 |
| B014 | 30001円~ |
5. Search restaurants
Build the hpp search command with resolved codes and flags:
hpp search --small-area <code> --party-capacity <N> --count 10
Key flags to apply based on user needs:
| Need | Flag |
|---|---|
| Party size | --party-capacity <N> |
| Genre | --genre <code> |
| Budget | --budget <code> |
| Private room | --private-room |
| Non-smoking | --non-smoking |
| WiFi | --wifi |
| All-you-can-drink | --free-drink |
| All-you-can-eat | --free-food |
| English menu | --english |
| Card payment | --card |
| Late night (after 11pm) | --midnight |
| Lunch | --lunch |
| Keyword | --keyword "<text>" |
| Coordinates | --lat <lat> --lng <lng> --range <1-5> |
Range values for coordinate search: 1=300m, 2=500m, 3=1km, 4=2km, 5=3km.
Always use JSON output (default) for parsing, then present results as a table.
6. 結果を表示する
結果は、次の列を含む Markdown テーブルで表示します。
| Column | Source |
|---|---|
| # | 行番号 |
| 店舗名 | name |
| ジャンル | genre.name |
| 予算 | budget.average |
| アクセス | access(駅名と徒歩時間を要約) |
| 個室 | private_room(あり/なし/半個室) |
| 営業時間 | open(該当する曜日のみ表示) |
| リンク | urls.pc(クリック可能な Markdown リンク) |
テーブルの後に、ユーザーの具体的なニーズに合ったおすすめを簡潔に紹介します(例:駅から最も近い、グループ向け、個室あり)。
7. 絞り込む(リクエストされた場合)
ユーザーが条件を絞り込みたい場合は、フラグを追加して再検索します。よく使う絞り込みは次のとおりです。
- 「個室あり」→
--private-roomを追加 - 「4000円未満」→
--budget B001,B002,B003を追加 - 「禁煙」→
--non-smokingを追加 - 「もっと表示して」→
--countを増やすか、ページネーションに--startを使用
その他の便利なコマンド
hpp shop --name "<name>"— 店舗名で特定の飲食店を検索hpp special list— 特集・タグを確認hpp creditcard— 利用可能なクレジットカードの種類を一覧表示
重要な注意事項
- 結果数を制限するため、必ず
--countを使用してください(デフォルトは 10、最大 100)。 - API は日本語のテキストを返します。ユーザーから翻訳を求められない限り、そのまま提示してください。
- 月曜日 = 月。
open/closeフィールドを確認して、指定された曜日に飲食店が営業しているか確認してください。 - ユーザーが曜日を指定した場合は、定休日を確認するために
closeフィールドを確認してください(例:日 = 日曜日)。 - クーポンのリンクは
coupon_urls.spで確認できます。ユーザーがクーポンについて尋ねた場合は、その旨を伝えてください。