Food

Recipe Detail

0calls
3 credits / call

Get a complete recipe by the ID returned from the search endpoint.

GET
uapis.cn
/api/v1/food/recipe/detail
Query parameters
1
id
string
required

Source-prefixed recipe ID from the search endpoint.

What you get

  • Ingredients (ingredients): with amounts, e.g. "鸡蛋 4个".
  • Steps (steps): ordered text instructions with photos.
  • Extras: author, rating, category, cover image.

Parameters

The id must keep its source prefix (xcf: or dg:). Reuse the id field from search results as-is; do not construct or modify it manually.

Query parameters

id
stringrequired

Source-prefixed recipe ID from the search endpoint.

Response

200 / OK

Lookup succeeded. Returns the complete recipe.

JSON
{
  "id": "xcf:104493058",
  "title": "超嫩滑的番茄炒蛋",
  "cover": "string",
  "url": "string",
  "source": "xcf",
  "author": "cheese喵喵喵喵喵",
  "description": "一道看似很简单的菜式……",
  "category": "家常菜",
  // Out of 10
  "rating": "8.0",
  "ingredients": [
    "鸡蛋 4个"
  ],
  "steps": [
    {
      "step": 1,
      "text": "加 1 小勺盐融于少量温水中",
      // Step photo, may be empty
      "image": "string"
    }
  ]
}

400 / Bad Request

Invalid parameters, e.g. missing or over-length id.

JSON
{
  "code": "INVALID_PARAMETER",
  "message": "id 不能为空"
}

404 / Not Found

Recipe not found or unrecognized ID prefix.

JSON
{
  "code": "NO_MATCH",
  "message": "没有找到相关结果: xxx"
}

502 / Bad Gateway

Data service temporarily unavailable. Retry later.

JSON
{
  "code": "SERVICE_UNAVAILABLE",
  "message": "查询服务暂时不可用,请稍后重试"
}