Raw instead of cooked for topic responses

Is there a way to get the raw as well as the cooked data inside a topic request for the replies? Currently, if you do a example.com/t/115.json, you get the topic and the post_stream (also other items I’m not interested with here). The post_stream contains only the cooked item. I would like the raw item as well. Currently, if I wanted to see the raw, I would have to do a query for each and every post in the post_stream individually. Seems pretty trivial to include the raw as well since it is in the actual post, but I’m not sure.

{
	"post_stream": {
		"posts": [{
				"id": 127,
				"name": "Mr. T",
				"username": "zxcvbnm",
				"avatar_template": "/user_avatar/example.com/zxcvbnm/{size}/65_1.png",
				"created_at": "2017-03-01T07:01:53.352Z",
				"cooked": "<p>hi 067E8865 3A9A 4BDE A820 067EFB2C3956 and bye</p>",
				"post_number": 1,
				"post_type": 1,
				"updated_at": "2017-03-01T07:01:53.352Z",
				"reply_count": 0,
				"reply_to_post_number": null,
				"quote_count": 0,
				"avg_time": null,
				"incoming_link_count": 0,
				"reads": 1,
				"score": 0.2,
				"yours": false,
				"topic_id": 105,
				"topic_slug": "this-is-a-silly-one-but-how-high-is-the-sky",
				"display_username": "Mr. T",
				"primary_group_name": null,
				"primary_group_flair_url": null,
				"primary_group_flair_bg_color": null,
				"primary_group_flair_color": null,
				"version": 1,
				"can_edit": false,
				"can_delete": false,
				"can_recover": false,
				"can_wiki": false,
				"read": false,
				"user_title": null,
				"actions_summary": [{
						"id": 2,
						"can_act": true
					}, {
						"id": 3,
						"can_act": true
					}, {
						"id": 4,
						"can_act": true
					}, {
						"id": 5,
						"hidden": true,
						"can_act": true
					}, {
						"id": 6,
						"can_act": true
					}, {
						"id": 7,
						"can_act": true
					}, {
						"id": 8,
						"can_act": true
					}
				],
				"moderator": false,
				"admin": false,
				"staff": false,
				"user_id": 56,
				"hidden": false,
				"hidden_reason_id": null,
				"trust_level": 2,
				"deleted_at": null,
				"user_deleted": false,
				"edit_reason": null,
				"can_view_edit_history": true,
				"wiki": false
			}, {
				"id": 132,
				"name": "You know you",
				"username": "yuyuyu",
				"avatar_template": "/letter_avatar_proxy/v2/letter/y/f6c823/{size}.png",
				"created_at": "2017-03-06T05:43:04.847Z",
				"cooked": "<p>This is a specific response to this question. But how does it end? In <img src=\"//example.com/images/emoji/emoji_one/fire.png?v=3\" title=\":fire:\" class=\"emoji\" alt=\":fire:\"> and <img src=\"//example.com/images/emoji/emoji_one/cry.png?v=3\" title=\":cry:\" class=\"emoji\" alt=\":cry:\">'s. This is a specific response to this question. But how does it end? In <img src=\"//example.com/images/emoji/emoji_one/fire.png?v=3\" title=\":fire:\" class=\"emoji\" alt=\":fire:\"> and <img src=\"//example.com/images/emoji/emoji_one/cry.png?v=3\" title=\":cry:\" class=\"emoji\" alt=\":cry:\">'s. This is a specific response to this question. But how does it end? In <img src=\"//example.com/images/emoji/emoji_one/fire.png?v=3\" title=\":fire:\" class=\"emoji\" alt=\":fire:\"> and <img src=\"//example.com/images/emoji/emoji_one/cry.png?v=3\" title=\":cry:\" class=\"emoji\" alt=\":cry:\">'s. This is a specific response to this question. But how does it end? In <img src=\"//example.com/images/emoji/emoji_one/fire.png?v=3\" title=\":fire:\" class=\"emoji\" alt=\":fire:\"> and <img src=\"//example.com/images/emoji/emoji_one/cry.png?v=3\" title=\":cry:\" class=\"emoji\" alt=\":cry:\">'s.</p>",
				"post_number": 2,
				"post_type": 1,
				"updated_at": "2017-03-06T05:43:04.847Z",
				"reply_count": 0,
				"reply_to_post_number": null,
				"quote_count": 0,
				"avg_time": null,
				"incoming_link_count": 0,
				"reads": 1,
				"score": 0.2,
				"yours": false,
				"topic_id": 105,
				"topic_slug": "this-is-a-silly-one-but-how-high-is-the-sky",
				"display_username": "You know you",
				"primary_group_name": null,
				"primary_group_flair_url": null,
				"primary_group_flair_bg_color": null,
				"primary_group_flair_color": null,
				"version": 1,
				"can_edit": false,
				"can_delete": false,
				"can_recover": false,
				"can_wiki": false,
				"read": false,
				"user_title": null,
				"actions_summary": [{
						"id": 2,
						"can_act": true
					}, {
						"id": 3,
						"can_act": true
					}, {
						"id": 4,
						"can_act": true
					}, {
						"id": 5,
						"hidden": true,
						"can_act": true
					}, {
						"id": 6,
						"can_act": true
					}, {
						"id": 7,
						"can_act": true
					}, {
						"id": 8,
						"can_act": true
					}
				],
				"moderator": false,
				"admin": false,
				"staff": false,
				"user_id": 63,
				"hidden": false,
				"hidden_reason_id": null,
				"trust_level": 2,
				"deleted_at": null,
				"user_deleted": false,
				"edit_reason": null,
				"can_view_edit_history": true,
				"wiki": false
			}
		],
		"stream": [127, 132]
	},
	"timeline_lookup": [[1, 14], [2, 9]],
	"id": 105,
	"title": "This is a silly one, but how high is the 🌌 sky?",
	"fancy_title": "This is a silly one, but how high is the 🌌 sky?",
	"posts_count": 2,
	"created_at": "2017-03-01T07:01:53.215Z",
	"views": 7,
	"reply_count": 0,
	"participant_count": 2,
	"like_count": 0,
	"last_posted_at": "2017-03-06T05:43:04.847Z",
	"visible": true,
	"closed": false,
	"archived": false,
	"has_summary": false,
	"archetype": "regular",
	"slug": "this-is-a-silly-one-but-how-high-is-the-sky",
	"category_id": 1,
	"word_count": 72,
	"deleted_at": null,
	"user_id": 56,
	"draft": null,
	"draft_key": "topic_105",
	"draft_sequence": 0,
	"unpinned": null,
	"pinned_globally": false,
	"pinned": false,
	"pinned_at": null,
	"pinned_until": null,
	"details": {
		"auto_close_at": null,
		"auto_close_hours": null,
		"auto_close_based_on_last_post": false,
		"created_by": {
			"id": 56,
			"username": "zxcvbnm",
			"avatar_template": "/user_avatar/example.com/zxcvbnm/{size}/65_1.png"
		},
		"last_poster": {
			"id": 63,
			"username": "yuyuyu",
			"avatar_template": "/letter_avatar_proxy/v2/letter/y/f6c823/{size}.png"
		},
		"participants": [{
				"id": 56,
				"username": "zxcvbnm",
				"avatar_template": "/user_avatar/example.com/zxcvbnm/{size}/65_1.png",
				"post_count": 1,
				"primary_group_name": null,
				"primary_group_flair_url": null,
				"primary_group_flair_color": null,
				"primary_group_flair_bg_color": null
			}, {
				"id": 63,
				"username": "yuyuyu",
				"avatar_template": "/letter_avatar_proxy/v2/letter/y/f6c823/{size}.png",
				"post_count": 1,
				"primary_group_name": null,
				"primary_group_flair_url": null,
				"primary_group_flair_color": null,
				"primary_group_flair_bg_color": null
			}
		],
				"id": 36,
				"title": "Testing a topic post",
				"fancy_title": "Testing a topic post",
				"slug": "testing-a-topic-post",
				"posts_count": 13,
				"reply_count": 0,
				"highest_post_number": 16,
				"image_url": null,
				"created_at": "2017-01-06T01:33:29.412Z",
				"last_posted_at": "2017-03-13T02:23:22.775Z",
				"bumped": true,
				"bumped_at": "2017-03-13T02:23:22.775Z",
				"unseen": false,
				"last_read_post_number": 15,
				"unread": 0,
				"new_posts": 1,
				"pinned": false,
				"unpinned": null,
				"visible": true,
				"closed": false,
				"archived": false,
				"notification_level": 3,
				"bookmarked": false,
				"liked": true,
				"archetype": "regular",
				"like_count": 13,
				"views": 47,
				"category_id": 1,
				"featured_link": null,
				"posters": [{
						"extras": null,
						"description": "Original Poster",
						"user": {
							"id": 27,
							"username": "abeers",
							"avatar_template": "/user_avatar/example.com/abeers/{size}/57_1.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 1,
							"username": "wwjd",
							"avatar_template": "/letter_avatar_proxy/v2/letter/w/ea666f/{size}.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 41,
							"username": "po_po_com",
							"avatar_template": "/user_avatar/example.com/po_po_com/{size}/61_1.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 50,
							"username": "nownow",
							"avatar_template": "/user_avatar/example.com/nownow/{size}/64_1.png"
						}
					}, {
						"extras": "latest",
						"description": "Most Recent Poster",
						"user": {
							"id": 72,
							"username": "bryhow15",
							"avatar_template": "/user_avatar/example.com/bryhow15/{size}/73_1.png"
						}
					}
				]
			}, {
				"id": 40,
				"title": "Test topic creation today",
				"fancy_title": "Test topic creation today",
				"slug": "test-topic-creation-today",
				"posts_count": 4,
				"reply_count": 0,
				"highest_post_number": 4,
				"image_url": null,
				"created_at": "2017-01-08T23:59:48.692Z",
				"last_posted_at": "2017-03-13T02:20:50.793Z",
				"bumped": true,
				"bumped_at": "2017-03-13T02:20:50.793Z",
				"unseen": false,
				"last_read_post_number": 1,
				"unread": 0,
				"new_posts": 3,
				"pinned": false,
				"unpinned": null,
				"visible": true,
				"closed": false,
				"archived": false,
				"notification_level": 3,
				"bookmarked": false,
				"liked": false,
				"archetype": "regular",
				"like_count": 2,
				"views": 17,
				"category_id": 1,
				"featured_link": null,
				"posters": [{
						"extras": null,
						"description": "Original Poster",
						"user": {
							"id": 27,
							"username": "abeers",
							"avatar_template": "/user_avatar/example.com/abeers/{size}/57_1.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 41,
							"username": "po_po_com",
							"avatar_template": "/user_avatar/example.com/po_po_com/{size}/61_1.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 71,
							"username": "qwerty",
							"avatar_template": "/user_avatar/example.com/qwerty/{size}/72_1.png"
						}
					}, {
						"extras": "latest",
						"description": "Most Recent Poster",
						"user": {
							"id": 73,
							"username": "kyoung98",
							"avatar_template": "/user_avatar/example.com/kyoung98/{size}/71_1.png"
						}
					}
				]
			}, {
				"id": 43,
				"title": "Testing topic creation after proguard",
				"fancy_title": "Testing topic creation after proguard",
				"slug": "testing-topic-creation-after-proguard",
				"posts_count": 7,
				"reply_count": 0,
				"highest_post_number": 11,
				"image_url": null,
				"created_at": "2017-01-15T07:44:39.916Z",
				"last_posted_at": "2017-03-07T07:13:25.975Z",
				"bumped": true,
				"bumped_at": "2017-03-07T07:13:25.975Z",
				"unseen": false,
				"last_read_post_number": 8,
				"unread": 0,
				"new_posts": 3,
				"pinned": false,
				"unpinned": null,
				"visible": true,
				"closed": false,
				"archived": false,
				"notification_level": 3,
				"bookmarked": false,
				"liked": true,
				"archetype": "regular",
				"like_count": 8,
				"views": 46,
				"category_id": 1,
				"featured_link": null,
				"posters": [{
						"extras": null,
						"description": "Original Poster",
						"user": {
							"id": 27,
							"username": "abeers",
							"avatar_template": "/user_avatar/example.com/abeers/{size}/57_1.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 1,
							"username": "wwjd",
							"avatar_template": "/letter_avatar_proxy/v2/letter/w/ea666f/{size}.png"
						}
					}, {
						"extras": null,
						"description": "Frequent Poster",
						"user": {
							"id": 41,
							"username": "po_po_com",
							"avatar_template": "/user_avatar/example.com/po_po_com/{size}/61_1.png"
						}
					}, {
						"extras": "latest",
						"description": "Most Recent Poster",
						"user": {
							"id": 65,
							"username": "fgfgfg",
							"avatar_template": "/user_avatar/example.com/fgfgfg/{size}/67_1.png"
						}
					}
				]
			}, {
				"id": 39,
				"title": "Last topic to create for now",
				"fancy_title": "Last topic to create for now",
				"slug": "last-topic-to-create-for-now",
				"posts_count": 3,
				"reply_count": 0,
				"highest_post_number": 3,
				"image_url": null,
				"created_at": "2017-01-06T01:43:44.094Z",
				"last_posted_at": "2017-02-21T06:03:34.407Z",
				"bumped": true,
				"bumped_at": "2017-02-21T06:03:34.407Z",
				"unseen": false,
				"last_read_post_number": 2,
				"unread": 0,
				"new_posts": 1,
				"pinned": false,
				"unpinned": null,
				"visible": true,
				"closed": false,
				"archived": false,
				"notification_level": 3,
				"bookmarked": false,
				"liked": false,
				"archetype": "regular",
				"like_count": 1,
				"views": 20,
				"category_id": 1,
				"featured_link": null,
				"posters": [{
						"extras": null,
						"description": "Original Poster",
						"user": {
							"id": 27,
							"username": "abeers",
							"avatar_template": "/user_avatar/example.com/abeers/{size}/57_1.png"
						}
					}, {
						"extras": "latest",
						"description": "Most Recent Poster",
						"user": {
							"id": 41,
							"username": "po_po_com",
							"avatar_template": "/user_avatar/example.com/po_po_com/{size}/61_1.png"
						}
					}
				]
			}, {
				"id": 122,
				"title": "Asdfsasdfawervbgnhtgfd",
				"fancy_title": "Asdfsasdfawervbgnhtgfd",
				"slug": "asdfsasdfawervbgnhtgfd",
				"posts_count": 2,
				"reply_count": 0,
				"highest_post_number": 2,
				"image_url": null,
				"created_at": "2017-03-16T02:40:22.177Z",
				"last_posted_at": "2017-03-16T02:40:46.709Z",
				"bumped": true,
				"bumped_at": "2017-03-16T02:40:46.709Z",
				"unseen": true,
				"pinned": false,
				"unpinned": null,
				"visible": true,
				"closed": false,
				"archived": false,
				"bookmarked": null,
				"liked": null,
				"archetype": "regular",
				"like_count": 0,
				"views": 1,
				"category_id": 1,
				"featured_link": null,
				"posters": [{
						"extras": "latest single",
						"description": "Original Poster, Most Recent Poster",
						"user": {
							"id": 67,
							"username": "abeers007",
							"avatar_template": "/user_avatar/example.com/abeers007/{size}/69_1.png"
						}
					}
				]
			}
		],
		"notification_level": 1,
		"can_invite_to": true,
		"can_create_post": true,
		"can_reply_as_new_topic": true,
		"can_flag_topic": true
	},
	"highest_post_number": 2,
	"deleted_by": null,
	"actions_summary": [{
			"id": 4,
			"count": 0,
			"hidden": false,
			"can_act": true
		}, {
			"id": 7,
			"count": 0,
			"hidden": false,
			"can_act": true
		}, {
			"id": 8,
			"count": 0,
			"hidden": false,
			"can_act": true
		}
	],
	"chunk_size": 20,
	"bookmarked": null,
	"featured_link": null
}

Just add a query string include_raw to your request like below :wink:

example.com/t/115.json?include_raw=true
9 Likes

Is there a similar way to get the raw with a request to the search.json endpoint? I tried the include_raw=true, but it didn’t work as expected.

2 Likes

How would I add the include_raw parameter to other json API’s? For instance, the search.json and the user_actions.json?