Include raw in json request response

AI-generated summary

The discussion revolves around including raw data in JSON responses for search and user actions requests. adam_beers wants to include raw excerpts in the response, similar to how including include_raw=true in a topic request provides both raw and cooked data.

Mittineague suggests that raw excerpts may not be available, but raw posts are. They also mention that fetching JSON data from multiple sources in a single request might be challenging, but a plugin could potentially solve this issue.

adam_beers clarifies that it is possible to retrieve multiple items in a single request, citing the example of a user_actions.json request with a filter, which returns all replies from a specific user.

Is there a way to include the raw as well as the cooked data for a search.json and user_actions.json request?

The “excerpt” in the response as urls, like the “cooked” entry for other responses. Wanted to have the raw data included. When getting a topic “115.json,” if you include the “include_raw=true” in the request it will supply the raw as well in the response. Trying to find a similar config in the search.json and user_actions.json requests.

Here is an example of a request to example.com/user_actions.json?username=user1234&filter=5 As seen, the excerpt is “cooked” and the title is raw. I would like the raw excerpt.

   "user_actions": [{
		"action_type": 5,
		"created_at": "2017-03-27T02:00:17.757Z",
		"excerpt": "<img src=\"//www.example.com/images/emoji/emoji_one/grinning.png?v=3\" title=\":grinning:\" class=\"emoji\" alt=\":grinning:\"> Reply with emoji face",
		"avatar_template": "/user_avatar/wwjd.example.com/user1234/{size}/57_1.png",
		"acting_avatar_template": "/user_avatar/wwjd.example.com/user1234/{size}/57_1.png",
		"slug": "this-is-an-emoji-post",
		"topic_id": 137,
		"target_user_id": 67,
		"target_name": null,
		"target_username": "user1234",
		"post_number": 3,
		"post_id": 185,
		"reply_to_post_number": null,
		"username": "user1234",
		"name": null,
		"user_id": 67,
		"acting_username": "user1234",
		"acting_name": null,
		"acting_user_id": 67,
		"title": "😀 This is an emoji post",
		"deleted": false,
		"hidden": false,
		"post_type": 1,
		"action_code": null,
		"category_id": 1,
		"closed": false,
		"archived": false
	}

Any ideas? If I knew how to change it, I would do it myself and submit the changes for review, but I’m not familiar with this programming language.

Is there someone I could talk to about how to go about changing it?

I don’t think there are raw excerpts.
There are raw posts.
I don’t know of any way to get JSON from more than one in a single request as things are now.
But this should be doable in a plugin that could pull the data and output it as JSON

If I do a user_actions.json?filter=5&username=bob123, then I will get all replies that bob123 has done. Which could be a large number, but it gives all of them back. It is getting more than one item, as you are talking about. I only showed one item for space limits.