internet Aktif Auth: api_key (header x-api-key)
/api/internet/resepdetail
Ambil bahan dan langkah dari tautan resep Cookpad Indonesia. Gunakan query untuk GET atau objek JSON untuk POST.
Method & Parameter
Method didukung: GET, POST · Biaya kuota: 1 unit/request.
| Nama | Lokasi | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
| url | query|body | string | Ya | Tautan HTTPS resep pada cookpad.com dengan path /id/resep/. |
Contoh Request (cURL)
curl -sS "https://api.sadiwa.site/api/internet/resepdetail?url=https%3A%2F%2Fcookpad.com%2Fid%2Fresep%2F26899836" \
-H "x-api-key: YOUR_API_KEY" Contoh JavaScript / TypeScript (fetch)
const res = await fetch("https://api.sadiwa.site/api/internet/resepdetail?url=https%3A%2F%2Fcookpad.com%2Fid%2Fresep%2F26899836", {
headers: { "x-api-key": "YOUR_API_KEY" },
});
const json = await res.json(); Contoh Respons Sukses
{
"data": {
"bahan": [
"Contoh bahan"
],
"judul": "Contoh resep",
"jumlahBahan": 1,
"jumlahLangkah": 1,
"langkah": [
"Contoh langkah"
]
},
"query": "https://cookpad.com/id/resep/26899836",
"source": "Cookpad",
"status": true
} Kode Error Standar
| HTTP | Arti | Solusi |
|---|---|---|
| 400 | Input tidak valid / kosong | Periksa parameter wajib. |
| 401 | API key tidak disertakan | Kirim header x-api-key. |
| 403 | API key tidak valid / dicabut / scope kurang | Periksa atau rotasi API key di dashboard. |
| 429 | Kuota harian atau rate limit tercapai | Tunggu reset UTC atau tingkatkan paket. |
| 502 | Sumber data eksternal tidak tersedia | Coba lagi setelah sumber pulih. |