Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Tools (scripts/apps/libraries) that help with answers, or issues with the API handling of answers
2
votes
Total Number Of Answers
Here's how it looks for that /users/{ids}/answers route:
/users/2440312/answers?site=stackoverflow&filter=!. … (EG: this two-user request yields total = 3663 (at least 37 pages of answers) with no way to tell which user has which without paging through your original-style query.) …
3
votes
Accepted
Top answers for a tag is returning user details?
If you really want the top answers for a tag, use the /search/excerpts route and set:
sort=votes
order=desc
q=is:answer
An appropriate filter (follow the example link, below)
For example, this gets … the top 30 answers for the Java tag:
/2.2/search/excerpts? …
2
votes
Accepted
How to get deleted answers?
And, when I use /questions/{ids}/answers to search a question where I know I have a deleted answer, the results only show me the undeleted answers. … So, clearly, the current API was not meant to support deleted answers. …
2
votes
Accepted
Get accepted answers from Stack Overflow using Stack Overflow API 2.1
The API filters are kept pretty simple, and there is no way to restrict these answers to just accepted answers. …
3
votes
Accepted
What is the difference between accepted and is_accepted?
For instance, if I obtain an access_token with the private_info privilege and call:
/2.2/questions/30028657/answers? … On questions owned by the authenticated user, accepted == is_accepted for any answers to that question.
Note that you need to use a filter that returns accepted, as this is not present by default. …
2
votes
The /search route is ignoring the answers parameter.
The /search/excerpts route looks to be about as good as /search and it does return both questions and answers, and it does have an answers parameter.
This route is "★ All new! For version 2.2! ★" …
4
votes
Accepted
Get total answers count for a specified: Tag, Userid and Date-range?
You can use the /users/{ids}/answers route to get what you want -- with a little work.
The trick is to use a filter that returns the answers.tags property. … The general procedure is:
Call /users/{ids}/answers with the desired user ID's, the desired date ranges, and an appropriate filter.
For example:
/users/1068142/answers? …
2
votes
How to monitor (for new) accepted answers by certain tags?
If you don't mind data that's up to a week old, you can use the Data Explorer (SEDE) to get answers by tag and by accept date. … See this query of Answers that were accepted after a given date and for given tags. …
1
vote
Accepted
How can I use the Stack Exchange API to get the total score on answers to questions with a s...
To do this you have to use the /users/{ids}/answers path to download all of a user's answers, and then filter out the tags and/or tot-up the scores from there. … Pseudo code:
scoreByTag = [] // Empty associative array
while (more pages of results) {
1) Fetch next page of answers
2) Store results and/or update scoreByTag array
}
Display/use select tag …
4
votes
Accepted
How to include answers when fetching questions?
The various /questions routes do allow you to simultaneously retrieve answers, if you set the right filter.
A good starting filter for getting questions with answers is: ! … Here is the critical part:
Expand the question group and check answers.
Expand the other fields and uncheck items you do not want. …
6
votes
The answer object returns an empty array for tags
This is a bug and seems (based on a series of A/B tests) to be linked with the body_markdown property.
That is, if your filter returns the tags array, it works:
"items": [ {
"tags": [ "batch-fil …
2
votes
Accepted
Search for answers/comments under questions with certain tags using the Stack Overflow API?
First, you'll want to go upvote the feature request to add tag search for answers, etc. … site=stackapps
Be sure to set/use a filter that includes answers and comments. …
1
vote
Default Stack Exchange behavior interferes with my "Mark answers as favorites" code?
myStarOff" href="#" data-ansID="1234" title="Click to add as favorite answer (click again to undo)">
favorite</a>
<a class="myStarOn" href="#" data-ansID="56789" title="Click to remove from favorite answers …
1
vote
Accepted
Get everything touched by a user?
You can give /answers/{ids} a filter to make it return: username, tags, and title for the answer's question -- which may be all you're after? … Feed the answer post id's, 100 at a time, to /answers/{ids} to get further details if desired.
Feed the question post id's, 100 at a time, to /questions/{ids} to get further details if desired. …
1
vote
Why doesn't the API return a 'locked date' for this locked answer?
Does it work on answers at all?
Here's a newer locked answer. Yet, it doesn't have a locked_date either.
It's not a filter issue.
Nor is it fixed in version 2.3 (yet). …