Skip to main content
7 votes
Accepted

How to create API filters?

You can create and edit filters from the documentation page of the API endpoint. So you start at the Index of all endpoints. There you'll find /users/{id}/answers. On the right at the top of the ...
rene's user avatar
  • 2,537
3 votes
Accepted

How do I see the differences between two or more SE API filters and merge into a filter which includes all requested properties (i.e. is a superset)?

To make it easier to merge filters, I wrote the following snippet. The detailed differences between each two filter combinations are a bit unwieldy to display in the snippet space, so they are output ...
Makyen's user avatar
  • 1,615
3 votes
Accepted

My filter is not returning any results. How to create a minimal filter?

The key mistake here is neglecting the Wrapper Object, and this is a big flaw with the filter documentation. The wrapper is the box that everything you get from the API comes in. You always get the ...
Brock Adams's user avatar
  • 12.9k
3 votes

What is the right way to create a Stack Exchange API filter?

I have struggled with Stack Exchange API filters too, when I tried to incorporate up_vote_count, down_vote_count and view_count attributes in my user response object. I visited this page of the ...
André Gasser's user avatar
3 votes

Field "comment_count" is not always returned by API

This appears to be closely related to the bug: Why is comment_count=1 (incorrectly) when this particular filter is used?. The workaround from there -- altering the filter by: selecting comment....
Brock Adams's user avatar
  • 12.9k
2 votes
Accepted

Can I pass multiple filters?

No, you cannot pass multiple filters. But the good news is you don't need to. Just create a custom filter. In your case, you might first set the edit tool to use withbody, and then further edit the ...
Brock Adams's user avatar
  • 12.9k
2 votes
Accepted

Can I pass a filter to a write method?

Yes. You can pass a filter, and you should (for all the standard reasons). First: On the doc page, changing the filter or preview, etc. will not change the URL for write methods. Write methods must ...
Brock Adams's user avatar
  • 12.9k
1 vote
Accepted

getting answer body and question body in same request

I recognize that problem, I've had it too in the past. It may be a bit counterintuitive, but you also have to select question.answers in the filter. A possible reason for this to not be automatic is ...
Glorfindel's user avatar
  • 6,772
1 vote
Accepted

Why does this minimal filter return no results at all?

Every response from the API contains a wrapper, with information about potential errors, your daily quota, and the actual results, which are in the items field. If you check that box: and hit Save, ...
Glorfindel's user avatar
  • 6,772
1 vote

Take the right filter for favourite count

I assume you're doing this call: https://api.stackexchange.com/docs/questions#order=desc&sort=activity&filter=!GeD4JB*YQqe2L&site=stackoverflow&run=true which indeed returns an empty ...
Glorfindel's user avatar
  • 6,772

Only top scored, non community-wiki answers of a minimum length are eligible