Food

Recipe Search

0calls
1 credits / call

Search recipes by dish name (e.g. 番茄炒蛋) or ingredient (e.g. 鸡蛋).

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

Dish name or ingredient keyword, up to 64 characters.

What you get

Each item includes the recipe title, cover image and a source-prefixed recipe ID (e.g. xcf:104493058). Pass this ID as-is to the detail endpoint to get the full ingredient list and step-by-step instructions.

Notes

  • Ingredient-based search is supported, perfect for "what can I cook with what I have".
  • The data source fails over automatically; the source field identifies where each result came from. No action needed on your side.
  • Returns 404 when nothing matches.

Query parameters

keyword
stringrequired

Dish name or ingredient keyword, up to 64 characters.

Response

200 / OK

Search succeeded. Returns matching recipes.

JSON
{
  "keyword": "番茄炒蛋",
  "count": 20,
  "items": [
    {
      // Source-prefixed recipe ID for the detail endpoint
      "id": "xcf:104493058",
      "title": "超嫩滑的番茄炒蛋",
      "cover": "string",
      // Original page URL
      "url": "string",
      // Data source identifier
      "source": "xcf"
    }
  ]
}

400 / Bad Request

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

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

404 / Not Found

No matching recipe found.

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

502 / Bad Gateway

Data service temporarily unavailable. Retry later.

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