搜索端点中的WP REST API(WP json)不返回完整数据

搜索端点中的WP REST API(WP json)不返回完整数据,json,wordpress,api,Json,Wordpress,Api,在搜索端点中的WP REST API WP json中: https://www.example.com/wp-json/wp/v2/search?search=searchPhrase&_embed 返回的数据如下所示: 0 id 5533 title "example" url "https://www.example.co…" type "post" subtype "post" _links self 0 embeddable true h

在搜索端点中的WP REST API WP json中:

https://www.example.com/wp-json/wp/v2/search?search=searchPhrase&_embed
返回的数据如下所示:

0   
id  5533
title   "example"
url "https://www.example.co…"
type    "post"
subtype "post"
_links  
self    
0   
embeddable  true
href    "https://www.example.com/wp-json/wp/v2/posts/5533"
about   
0   
href    "https://www.example.com/wp-json/wp/v2/types/post"
collection  
0   
href    "https://www.example.com/wp-json/wp/v2/search"
它返回的数据不完整,比如/posts端点包含更多字段,比如content extract

如何完成/搜索端点的输出数据


谢谢您的时间。

我找到了解决方案,我们应该使用这个端点返回帖子的完整数据

https://www.example.com/wp-json/wp/v2/posts?search=searchphrase&_embed