usernamestringobrigatório
Reddit username
https://api.sandbase.ai/v1/api/reddit/app/user-active-subredditsReturns a list of Reddit communities where a specified user participates most actively. Supports optional response formatting.
[
{
"data": {
"redditorInfoByName": {
"__typename": "Redditor",
"activeSubreddits": []
}
}
}
]Selecione um exemplo para carregar as entradas e o resultado no playground.
Returns the Reddit communities where a given user is most active. It needs a Reddit username, such as spez. The sample call for spez returned the user object with activeSubreddits set to null.
activeSubreddits value across several usernames to see which accounts have data.curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/user-active-subreddits" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "spez"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Reddit username |
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.
{
"redditorInfoByName": {
"__typename": "Redditor",
"activeSubreddits": null
}
}
| Field | Meaning |
|---|---|
redditorInfoByName | The user record that matches the username you sent. |
redditorInfoByName.__typename | The object type. The value Redditor confirms the lookup found a Reddit user account. |
redditorInfoByName.activeSubreddits | The list of communities where the user is most active. It is null in the sample response for spez, so no active subreddits came back for that call. |
username without the u/ prefix, as in the example spez.null value in activeSubreddits in your code, since the sample response for spez returned no list.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/user-active-subreddits" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"username": "example"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
usernamestringobrigatórioReddit username
need_formatbooleanWhether to clean and format the data
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
[
{
"data": {
"redditorInfoByName": {
"__typename": "Redditor",
"activeSubreddits": []
}
}
}
]Explorar mais
| API | Preço | Resposta |
|---|---|---|
Reddit User Active SubredditsEsta API Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Reddit | $0.001 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/reddit/app/user-active-subreddits com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.001 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: username (string). Opcionais: need_format (boolean). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Reddit User Active Subreddits funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Reddit separadamente.