Reddit App Fetch Subreddit Style
Retrieve the rules and style information for a Reddit subreddit. Inputs (all optional): - subreddit_name: Bare subreddit name, without "r/"; 2–21 letters (A–Z, a–z), digits, or underscores. Default: "pics". - language: Preferred response language as an IETF language tag, such as "en-US". Must be 2–16 characters and match ^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$. Default: "en-US". - need_format: Whether to request data cleaning and formatting. Default: false. Returns: A JSON response whose data contains the subreddit's rules and style information. The detailed fields are not specified, and data may be null. Example: {"subreddit_name":"pics","language":"en-US","need_format":false}
Pricing
| Condition | Charge |
|---|---|
| Each call | 2.07 credits/call |
2.07 credits/call Charges are per query. A successful query is billed even if it returns no results.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
language | string | No | 返回内容使用的语言,采用 IETF 语言标签;默认 en-US / Preferred response language as an IETF language tag; default: en-US | en-US |
need_format | boolean | No | 是否需要清洗数据/Whether to clean and format the data | false |
subreddit_name | string | No | 版块名称/Subreddit name | pics |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_reddit_app_fetch_subreddit_style' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"need_format": true,
"subreddit_name": "espresso"
}
}'{
"code": 200,
"data": {
"subredditInfoByName": {
"id": "t5_2rqoi",
"rules": [
{
"content": {
"html": "<p>We strive to cultivate an inclusive and welcoming community for newcomers, burgeoning enthusiasts, and veterans alike. Don’t gatekeep or look down on people’s equipment or taste preferences.</p>\n\n<p>Prohibited content:\n- Harassment, bullying",
"markdown": "We strive to cultivate an inclusive and welcoming community for newcomers, burgeoning enthusiasts, and veterans alike. Don't gatekeep or look down on people's equipment or taste preferences.\n\nProhibited content:\n- Harassment, bullying, [flaming](https://en",
"richtext": "{}"
},
"id": "ca568c88-1ffa-4aa7-b9ed-7c842a0b3283",
"name": "Be civil",
"priority": 0,
"violationReason": "Breaks subreddit code of conduct"
}
],
"styles": {
"bannerBackgroundColor": "#131516",
"bannerBackgroundImage": "https://styles.redditmedia.com/t5_2rqoi/styles/bannerBackgroundImage_d5r3nasb287e1.png?frame=1&auto=webp&s=cdcc2131968d8a86fcca59f434dfd57ea6647268",
"highlightColor": "#9C5716",
"icon": "https://styles.redditmedia.com/t5_2rqoi/styles/communityIcon_2ecjqa4s2m6e1.jpg?width=64&frame=1&auto=webp&s=f85e8c15d8b040131c4670ae292a550eef091331",
"mobileBannerImage": "https://styles.redditmedia.com/t5_2rqoi/styles/mobileBannerImage_r6f0tmxjgbgd1.png?frame=1&auto=webp&s=42b4d8c597f370ad8d17c8cb40c0d923835464a3",
"primaryColor": "#D09C43"
},
"widgets": {
"orderedSidebarWidgets": [
{
"display": "compact",
"id": "widget_rules-2rqoi",
"shortName": "Subreddit Rules"
}
],
"orderedTopbarWidgets": [
{
"id": "widget_13rk6b9wkivel",
"isWikiShown": true
}
]
}
}
},
"docs": "https://api.tikhub.io/#/Reddit-APP-API/fetch_subreddit_style_api_v1_reddit_app_fetch_subreddit_style_get",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"request_id": "979c3013-62ab-4d43-9324-32191e136fce"
}This example shows part of the response. Copied content is valid JSON.

