Recipe Finder
Recipe Finder
Documentation
API Overview
This API provides a structured recipe data query service. Developers can search by specifying a dish category (supporting first to third-level categories), dish name, or unique ID. The API returns a complete data structure including dish name, category hierarchy, thumbnail, list of required ingredients, and step-by-step cooking instructions, suitable for business scenarios requiring detailed recipe information.
Use Cases
- Food Apps/Websites: Enrich the internal recipe library and provide standardized cooking tutorials.
- Smart Hardware Integration: Provide standardized instruction step data for smart kitchen appliances and cooking robots.
- Content Aggregation Platforms: Quickly build vertical food content sections, supporting filtering by dimensions such as meat or vegetables.
Request and Response Details
- Request Method: POST
- Core Parameters:
type(required): Recipe category, it is recommended to use first or second-level category tags.name(optional): Fuzzy search for dish names.id(optional): Specify a recipe ID to get single item details.pageNo/pageSize: Control paginated data, default 20 items per page.- Response Result:
- Basic Information: Dish name, multi-level category tags, creation time.
- Multimedia Resources: Small image (
smallImag) and large image (largeImg) links. - Core Content:
ylarray contains ingredient names and units;stepsarray contains ordered operational step text.
Integration Recommendations
- Caching Strategy: Recipe data is relatively static. It is recommended to cache results for popular categories or specific IDs locally to reduce API call frequency.
- Image Handling: The returned image URLs might be empty; the frontend should adapt with default images.
- Pagination Logic: For initial loading, request the first page. Implement lazy loading or a paginator based on the returned
totalPageto avoid fetching a large amount of data at once.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"type": "菜谱的分类(查询时请使用分类中的一级或二级分类)",
"pageNo": "请求页数 默认第1页",
"pageSize": "每页返回的最大结果集,默认20",
"id": "菜谱标识 菜谱列表中id,可以用id查询详细",
"name": "菜品名称"
}Response Example
{
"code": 200,
"msg": "成功",
"taskNo": "025008804237815320489132",
"data": {
"totalPage": 61,
"pageNo": 1,
"pageSize": 20,
"totalCount": 1214,
"items": [
{
"type": "肉类 兔肉 兔肉",
"typeV1": "肉类",
"typeV2": "兔肉",
"typeV3": "兔肉",
"name": "泰顺腊兔肉",
"desc": "",
"tip": "",
"id": "5c4c75b3e9b6cc139e5dd87a",
"createTime": "2019-01-26 22:58:59.575",
"smallImag": "",
"largeImg": "",
"steps": [
{
"orderNum": 1,
"content": "腊兔肉切好,锅里放多油,油热后放入腊兔肉爆炒一会儿,然后放入姜蒜葱白胡萝卜爆香!炒之前用料酒酱油盐鸡精白糖调好的汁倒入锅中,等入味了就可以放葱香菜起锅了!"
}
],
"yl": [
{
"ylUnit": "胡萝卜",
"ylName": "泰顺腊兔子"
},
{
"ylUnit": "姜",
"ylName": "葱"
},
{
"ylUnit": "香菜",
"ylName": "蒜"
}
]
}
]
}
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.type | object | {...} |
| properties.type.type | string | string |
| properties.type.description | string | 菜谱的分类(查询时请使用分类中的一级或二级分类) |
| properties.pageNo | object | {...} |
| properties.pageNo.type | string |
Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.code | object | {...} |
| properties.code.type | string | number |
| properties.code.example | number | 200 |
| properties.msg | object | {...} |
| properties.msg.type | string | string |