{"id":47747834,"url":"https://github.com/evex-dev/cookpad-ts","last_synced_at":"2026-04-05T04:01:29.464Z","repository":{"id":347712775,"uuid":"1195024168","full_name":"evex-dev/cookpad-ts","owner":"evex-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-29T05:38:54.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T10:18:27.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evex-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-29T05:34:41.000Z","updated_at":"2026-03-31T21:36:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/evex-dev/cookpad-ts","commit_stats":null,"previous_names":["evex-dev/cookpad-ts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evex-dev/cookpad-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fcookpad-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fcookpad-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fcookpad-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fcookpad-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evex-dev","download_url":"https://codeload.github.com/evex-dev/cookpad-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fcookpad-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31385935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T02:00:14.556Z","updated_at":"2026-04-04T03:01:13.261Z","avatar_url":"https://github.com/evex-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cookpad-ts\n\nCookpad の非公開 API を叩く TypeScript クライアント。\n\nPython 版 [cookpad-py](https://github.com/evex-dev/cookpad-py) の TypeScript リライト。\n\n## 必要環境\n\n- Node.js 18 以上（組み込み `fetch` を使用）\n\n## インストール\n\n```bash\nnpm install\nnpm run build\n```\n\n## 使い方\n\n```typescript\nimport { Cookpad } from \"cookpad-ts\";\n\nconst client = new Cookpad();\n\n// レシピ検索\nconst results = await client.searchRecipes(\"カレー\", { perPage: 5 });\nconsole.log(results.totalCount); // 98564\nfor (const r of results.recipes) {\n  console.log(r.title, r.id);\n}\n\n// レシピ詳細\nconst recipe = await client.getRecipe(25557685);\nconsole.log(recipe.title);\nconsole.log(recipe.ingredients.map((i) =\u003e i.name));\n\n// ユーザー検索\nconst users = await client.searchUsers(\"cook\");\nfor (const u of users.users) {\n  console.log(u.name, u.recipeCount);\n}\n```\n\n## API\n\n### `new Cookpad(options?)`\n\n| オプション | 型 | デフォルト |\n|---|---|---|\n| `token` | `string` | 組み込みトークン |\n| `country` | `string` | `\"JP\"` |\n| `language` | `string` | `\"ja\"` |\n| `timezoneId` | `string` | `\"Asia/Tokyo\"` |\n| `timezoneOffset` | `string` | `\"+09:00\"` |\n| `userAgent` | `string` | 組み込み UA |\n| `providerId` | `string` | `\"8\"` |\n\n### メソッド\n\n| メソッド | Python 版対応 | 戻り値 |\n|---|---|---|\n| `searchRecipes(query, options?)` | `search_recipes()` | `SearchResponse` |\n| `getRecipe(id)` | `get_recipe()` | `Recipe` |\n| `getSimilarRecipes(id, options?)` | `get_similar_recipes()` | `Recipe[]` |\n| `getComments(id, options?)` | `get_comments()` | `CommentsResponse` |\n| `searchUsers(query, options?)` | `search_users()` | `UsersResponse` |\n| `searchKeywords(query?)` | `search_keywords()` | `object` |\n| `getSearchHistory(localHistory?)` | `get_search_history()` | `object` |\n\n## 型\n\n```typescript\ninterface Recipe {\n  id: number;\n  title: string;\n  cookingTime: string | null;\n  serving: string;\n  imageUrl: string | null;\n  ingredients: Ingredient[];\n  steps: Step[];\n  user: User | null;\n  viewCount: number;\n  bookmarksCount: number;\n  // ...\n}\n\ninterface User {\n  id: number;\n  name: string;\n  recipeCount: number;\n  followerCount: number;\n  // ...\n}\n```\n\n## エラー\n\n```typescript\nimport { AuthenticationError, NotFoundError, RateLimitError, APIError } from \"cookpad-ts\";\n\ntry {\n  await client.getRecipe(999999999);\n} catch (e) {\n  if (e instanceof NotFoundError) console.log(\"not found\");\n  if (e instanceof APIError) console.log(e.statusCode);\n}\n```\n\n## ライセンス\n\nThe Unlicense — 詳細は [LICENSE](LICENSE) を参照。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevex-dev%2Fcookpad-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevex-dev%2Fcookpad-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevex-dev%2Fcookpad-ts/lists"}