subreddit_idstringobligatoire
Subreddit ID starting with "t5_", can be obtained from fetch_subreddit_info endpoint
https://api.sandbase.ai/v1/api/reddit/app/check-subreddit-mutedChecks whether a specified Reddit subreddit is muted by the current account using its ID. Supports an optional flag to format the returned output.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
Returns whether the current account has muted a given Reddit subreddit. It needs a subreddit_id that starts with t5_, such as t5_2qh0u.
curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/check-subreddit-muted" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subreddit_id": "t5_2qh0u"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
subreddit_id | string | Yes | Subreddit ID starting with "t5_", can be obtained from fetch_subreddit_info endpoint |
need_format | boolean | No | Whether to clean and format the data |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"subredditInfoById": {
"__typename": "Subreddit",
"isMuted": false
}
}
| Field | Meaning |
|---|---|
subredditInfoById | Wrapper object for the subreddit that matches the requested subreddit_id. |
subredditInfoById.__typename | Object type name. The value is Subreddit for a subreddit record. |
subredditInfoById.isMuted | Boolean mute flag. true means the current account has muted this subreddit, and false means it has not. |
subreddit_id from the Reddit App Subreddit Info API. The ID starts with t5_.subreddit_id can return different values for different accounts.need_format is optional and is a boolean. The example request omits it.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/check-subreddit-muted" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subreddit_id": "t5_2qh0u"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
subreddit_idstringobligatoireSubreddit ID starting with "t5_", can be obtained from fetch_subreddit_info endpoint
need_formatbooleanWhether to clean and format the data
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
Reddit Subreddit Mute StatusCette API Reddit | $0.001 par appel | JSON |
Reddit | $0.001 par appel | JSON |
Reddit | $0.001 par appel | JSON |
Reddit | $0.001 par appel | JSON |
Reddit | $0.001 par appel | JSON |
Reddit | $0.001 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/reddit/app/check-subreddit-muted avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.001 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : subreddit_id (string). Facultatif : need_format (boolean). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. Reddit Subreddit Mute Status fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Reddit séparément.