Stack Exchange

Data & APIs

Stack Exchange API integration with managed OAuth for Q&A knowledge automation. Search questions, retrieve answers, browse tags, manage user profiles, track reputation, list collectives, and analyze community activity across all Stack Exchange sites. Use this skill when users want to search Stack Overflow for solutions, find answers to technical questions, browse tags and badges, track user reputation, or analyze community activity patterns.

Install

openclaw skills install stack-exchange

Stack Exchange

Stack Exchange

Stack Exchange is a network of Q&A communities including Stack Overflow, Server Fault, Super User, and more. This integration uses managed OAuth through ClawLink to search questions, retrieve answers, track reputation, browse tags, and analyze community activity across the entire Stack Exchange network.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Stack Exchange
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Stack Exchange

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│ Stack Exchange API│
│   (User Chat)   │     │   (OAuth)    │     │                  │
└─────────────────┘     └──────────────┘     └──────────────────┘

Install

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Quick Start

Search for questions on Stack Overflow:

clawlink_execute_tool --integration stack-exchange --tool stack_exchange_get_search_results --args '{"site": "stackoverflow", "tagged": "python", "intitle": "async await"}'

Get answers for a specific question:

clawlink_execute_tool --integration stack-exchange --tool stack_exchange_get_question_answers --args '{"ids": "12345678", "site": "stackoverflow"}'

Search with advanced filters:

clawlink_execute_tool --integration stack-exchange --tool stack_exchange_search_advanced --args '{"site": "stackoverflow", "q": "docker compose networking", "accepted": true, "sort": "votes"}'

Authentication

Stack Exchange uses OAuth 2.0 managed by ClawLink. No API keys are needed. Some endpoints (user-specific data, inbox, achievements) require authentication. Authorize access through the ClawLink dashboard.

Connect at: https://claw-link.dev/dashboard?add=stack-exchange

Connection Management

List connections:

clawlink_list_integrations

Verify connection:

clawlink_execute_tool --integration stack-exchange --tool stack_exchange_get_me --args '{"site": "stackoverflow"}'

Reconnect: If a connection expires, visit the dashboard URL above and reconnect Stack Exchange.

Security & Permissions

  • Read operations are safe and require no confirmation. All Stack Exchange tools in this integration are read-only or create filters.
  • Write operations are limited to creating custom filters, which are safe helper objects.
  • The Stack Exchange API has a daily request quota. Monitor quota_remaining in responses.

Tool Reference

Search Operations

ToolDescriptionMode
stack_exchange_get_search_resultsSearch questions by tags, title, or keywordsRead
stack_exchange_search_advancedAdvanced search with filters (accepted, closed, body, title, user, views)Read
stack_exchange_search_excerptsSearch with highlighted excerpt snippetsRead
stack_exchange_find_similar_questionsFind questions similar to a hypothetical title and tagsRead

Question Operations

ToolDescriptionMode
stack_exchange_get_questionsList questions (newest, most voted, date-filtered)Read
stack_exchange_get_questions_by_idsRetrieve specific questions by ID (up to 100)Read
stack_exchange_get_question_answersRetrieve all answers for specific question IDsRead
stack_exchange_get_question_commentsRetrieve comments on specific questionsRead
stack_exchange_get_question_timelineRetrieve timeline events for questionsRead
stack_exchange_get_question_flag_optionsFetch valid flag options for a questionRead
stack_exchange_get_question_close_optionsFetch close reason options for a questionRead
stack_exchange_get_linked_questionsFind questions linked to specific question IDsRead
stack_exchange_get_questions_by_answer_idsFind parent questions for specific answer IDsRead
stack_exchange_list_featured_questionsList all questions with active bountiesRead
stack_exchange_list_no_answer_questionsList questions with zero answersRead
stack_exchange_list_unanswered_questionsList questions lacking upvoted answersRead

Answer Operations

ToolDescriptionMode
stack_exchange_list_answersList all undeleted answers from a siteRead
stack_exchange_get_answers_by_idsRetrieve specific answers by ID (up to 100)Read
stack_exchange_get_answer_commentsRetrieve comments on specific answersRead
stack_exchange_get_answer_flag_optionsFetch valid flag options for an answerRead
stack_exchange_render_answerRender a preview of an answer (markdown to HTML)Read

Post Operations

ToolDescriptionMode
stack_exchange_list_postsList all posts (questions and answers) from a siteRead
stack_exchange_get_posts_by_idsRetrieve posts by ID (handles both questions and answers)Read
stack_exchange_get_post_commentsRetrieve comments on posts regardless of typeRead
stack_exchange_get_post_suggested_editsRetrieve suggested edits on specific postsRead
stack_exchange_get_revisions_by_idsRetrieve edit history for postsRead

Comment Operations

ToolDescriptionMode
stack_exchange_get_commentsRetrieve recent comments from a siteRead
stack_exchange_get_comments_by_idsRetrieve specific comments by ID (up to 100)Read
stack_exchange_get_comment_flag_optionsFetch valid flag options for a commentRead

Tag Operations

ToolDescriptionMode
stack_exchange_list_tagsList all tags on a site (by popularity, activity, name)Read
stack_exchange_get_tag_infoRetrieve detailed info about specific tagsRead
stack_exchange_get_tag_faqRetrieve frequently asked questions for tagsRead
stack_exchange_get_tag_synonymsRetrieve synonyms for specific tagsRead
stack_exchange_get_tag_wikisRetrieve wiki content for tagsRead
stack_exchange_get_tag_top_answerersTop 30 answerers for a tag (all-time or 30 days)Read
stack_exchange_get_tag_top_askersTop askers for a tag (all-time or 30 days)Read
stack_exchange_get_related_tagsFind tags most related to specified tagsRead
stack_exchange_list_tag_synonymsList all tag synonyms on a siteRead
stack_exchange_list_tag_badgesList badges awarded for tag participationRead
stack_exchange_list_moderator_only_tagsList tags only moderators can useRead
stack_exchange_list_required_tagsList required tags for questionsRead

Badge Operations

ToolDescriptionMode
stack_exchange_list_badgesList all available badgesRead
stack_exchange_list_named_badgesList explicitly named (general) badgesRead
stack_exchange_list_badge_recipientsList recently awarded badgesRead
stack_exchange_get_badges_by_idsRetrieve specific badges by IDRead
stack_exchange_get_badge_recipients_by_idsList recent recipients of specific badgesRead

User Operations (General)

ToolDescriptionMode
stack_exchange_list_usersList all users on a siteRead
stack_exchange_get_users_by_idsRetrieve user profiles by IDRead
stack_exchange_get_user_answersList answers posted by specific usersRead
stack_exchange_get_user_questionsList questions asked by specific usersRead
stack_exchange_get_user_postsList all posts by specific usersRead
stack_exchange_get_user_commentsList comments by specific usersRead
stack_exchange_get_user_comments_to_userList comments between two specific usersRead
stack_exchange_get_user_favoritesList questions favorited by usersRead
stack_exchange_get_user_badgesList badges earned by usersRead
stack_exchange_get_user_tagsList tags users are active inRead
stack_exchange_get_user_timelineRetrieve timeline of user actionsRead
stack_exchange_get_user_privilegesList privileges a user has earnedRead
stack_exchange_get_user_mentionsList comments mentioning specific usersRead
stack_exchange_get_user_merge_historyTrack account merge history for usersRead
stack_exchange_get_user_associated_accountsList all SE accounts for usersRead
stack_exchange_get_user_suggested_editsList suggested edits by usersRead

User Reputation Operations

ToolDescriptionMode
stack_exchange_get_user_reputationRetrieve reputation changes for usersRead
stack_exchange_get_user_reputation_historyRetrieve public reputation history for usersRead
stack_exchange_get_user_full_reputation_historyRetrieve full (including private) reputation historyRead

User Top Tags & Answers

ToolDescriptionMode
stack_exchange_get_user_top_tagsTop 30 tags by combined score for a userRead
stack_exchange_get_user_top_answer_tagsTop 30 tags by answer score for a userRead
stack_exchange_get_user_top_question_tagsTop 30 tags by question score for a userRead
stack_exchange_get_user_top_answers_in_tagsTop 30 answers by a user in specific tagsRead
stack_exchange_get_user_top_questions_in_tagsTop 30 questions by a user in specific tagsRead
stack_exchange_get_user_unanswered_questionsUnanswered questions by specific usersRead
stack_exchange_get_user_unaccepted_questionsQuestions with no accepted answer by usersRead
stack_exchange_get_user_no_answer_questionsQuestions with zero answers by usersRead
stack_exchange_get_user_featured_questionsQuestions with bounties by specific usersRead

User Notifications & Inbox

ToolDescriptionMode
stack_exchange_get_user_notificationsRetrieve notifications for a userRead
stack_exchange_get_user_unread_notificationsRetrieve unread notifications for a userRead
stack_exchange_get_user_inboxRetrieve a user's inboxRead
stack_exchange_get_user_unread_inboxRetrieve unread inbox items for a userRead

Authenticated User (Me) Operations

ToolDescriptionMode
stack_exchange_get_meRetrieve the authenticated user's profileRead
stack_exchange_get_my_achievementsRetrieve recent network-wide achievementsRead
stack_exchange_get_my_associated_accountsList all SE accounts for the authenticated userRead
stack_exchange_get_my_postsList posts owned by the authenticated userRead
stack_exchange_get_my_questionsList questions owned by the authenticated userRead
stack_exchange_get_my_featured_questionsList user's questions with active bountiesRead
stack_exchange_get_my_mentionsList comments mentioning the authenticated userRead
stack_exchange_get_my_merge_historyRetrieve account merge historyRead
stack_exchange_get_my_network_activityRetrieve network-wide activity summaryRead
stack_exchange_get_my_no_answer_questionsList user's questions with zero answersRead
stack_exchange_get_my_postsList all posts (Q&A) by the authenticated userRead
stack_exchange_get_my_privilegesList privileges for the authenticated userRead
stack_exchange_get_my_reputationRetrieve reputation changesRead
stack_exchange_get_my_reputation_historyRetrieve chronological reputation historyRead
stack_exchange_get_my_suggested_editsList suggested edits by the userRead
stack_exchange_get_my_tag_preferencesRetrieve favorite and ignored tagsRead
stack_exchange_get_my_tagsList tags the user is active inRead
stack_exchange_get_my_timelineRetrieve timeline of user actionsRead
stack_exchange_get_my_top_answer_tagsTop 30 tags by answer scoreRead
stack_exchange_get_my_top_answers_in_tagsTop 30 answers in specific tagsRead
stack_exchange_get_my_top_question_tagsTop 30 tags by question scoreRead
stack_exchange_get_my_top_questions_in_tagsTop 30 questions in specific tagsRead
stack_exchange_get_my_top_tagsTop 30 tags by combined scoreRead
stack_exchange_get_my_unaccepted_questionsUser's questions with no accepted answerRead
stack_exchange_get_my_unanswered_questionsUser's questions considered unansweredRead
stack_exchange_list_unanswered_questions_my_tagsUnanswered questions in the user's tagsRead

Collective Operations

ToolDescriptionMode
stack_exchange_get_collectivesList all collectives on a siteRead
stack_exchange_get_collectives_by_slugsRetrieve collectives by slug identifiersRead
stack_exchange_get_collective_questionsRetrieve questions for a collectiveRead
stack_exchange_get_collective_answersRetrieve answers for a collectiveRead
stack_exchange_get_collective_usersList members of a collectiveRead
stack_exchange_get_collective_tagsRetrieve tags associated with collectivesRead

Suggested Edits

ToolDescriptionMode
stack_exchange_list_suggested_editsList all suggested edits on a siteRead
stack_exchange_get_suggested_edits_by_idsRetrieve specific suggested edits by IDRead

Site & Network Operations

ToolDescriptionMode
stack_exchange_get_sitesList all Stack Exchange network sites with API identifiersRead
stack_exchange_get_site_infoRetrieve statistics and info about a siteRead
stack_exchange_get_eventsRetrieve recent events stream (15-minute window)Read
stack_exchange_list_errorsList all API error codesRead
stack_exchange_list_privilegesList all earnable privileges on a siteRead
stack_exchange_list_moderatorsList users with moderation powersRead
stack_exchange_list_elected_moderatorsList elected moderators onlyRead

Filter & Authentication Operations

ToolDescriptionMode
stack_exchange_create_filterCreate a custom response filterWrite
stack_exchange_get_filters_by_idsRetrieve filter field definitionsRead
stack_exchange_get_access_tokensVerify and inspect OAuth access tokensRead

Code Examples

Search Stack Overflow for Python async questions:

{
  "tool": "stack_exchange_get_search_results",
  "args": {
    "site": "stackoverflow",
    "intitle": "async await",
    "tagged": "python",
    "sort": "votes"
  }
}

Get answers for a specific question:

{
  "tool": "stack_exchange_get_question_answers",
  "args": {
    "ids": "12345678",
    "site": "stackoverflow",
    "sort": "votes",
    "order": "desc"
  }
}

Advanced search with multiple filters:

{
  "tool": "stack_exchange_search_advanced",
  "args": {
    "site": "stackoverflow",
    "q": "kubernetes pod crashloopbackoff",
    "accepted": true,
    "sort": "relevance"
  }
}

Get user's top tags:

{
  "tool": "stack_exchange_get_my_top_tags",
  "args": {
    "site": "stackoverflow"
  }
}

List all Stack Exchange sites:

{
  "tool": "stack_exchange_get_sites",
  "args": {}
}

Discovery Workflow

  1. Call clawlink_list_integrations to confirm stack-exchange is connected.
  2. Call clawlink_list_tools --integration stack-exchange to see the live catalog.
  3. Use stack_exchange_get_sites to discover available Stack Exchange sites and their API identifiers.
  4. Use stack_exchange_get_search_results or stack_exchange_search_advanced to find relevant content.
  5. Use stack_exchange_get_question_answers to retrieve solutions.

Execution Workflow

Read Flow:
  get_sites → get_search_results → get_questions_by_ids → get_question_answers

User Flow:
  get_me → get_my_questions / get_my_reputation / get_my_tags

Tag Flow:
  list_tags → get_tag_info → get_tag_faq / get_tag_top_answerers

Notes

  • The site parameter is required for most operations. Use values like stackoverflow, serverfault, superuser, askubuntu, etc. Obtain the full list from stack_exchange_get_sites.
  • IDs can be semicolon-delimited for batch operations (up to 100 IDs at once).
  • The API has a daily request quota. Monitor quota_remaining in responses to avoid hitting the limit.
  • Events from get_events are only accessible for 15 minutes after they occurred.
  • Site info from get_site_info is heavily cached; query sparingly (no more than once per hour).
  • User-specific endpoints (inbox, notifications, achievements) require the read_inbox OAuth scope.

Error Handling

Status / ErrorMeaning
400 Bad RequestInvalid parameter or missing required field
401 UnauthorizedOAuth token expired or missing for authenticated endpoints
403 ForbiddenAccess denied; check OAuth scopes
404 Not FoundInvalid question, answer, or user ID
429 Too Many RequestsDaily API quota exhausted; wait until quota resets
500 Internal Server ErrorStack Exchange API issue; retry later

Troubleshooting

Tools Not Visible

Run clawlink_list_tools --integration stack-exchange to verify the integration is active. If empty, reconnect at https://claw-link.dev/dashboard?add=stack-exchange.

Search Returns No Results

Ensure the site parameter is correct (e.g., stackoverflow not stack-overflow). Verify that tagged or intitle is provided for get_search_results (at least one is required).

Quota Exceeded

The Stack Exchange API enforces a daily quota. Monitor quota_remaining in each response. Consider creating a custom filter with create_filter to reduce response sizes.

User-Specific Data Not Available

Authenticated endpoints require a valid OAuth connection. Ensure you have connected your Stack Exchange account and granted the read_inbox scope.

Resources


Powered by ClawLink -- an integration hub for OpenClaw

ClawLink Logo