Hot answers tagged

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 ...
  • 2,220
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 ...
  • 1,528
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 ...
  • 12.8k
3 votes

Where are the built-in filters?

"A number of" might be a bit of a misnomer, as there are a whopping four standard ones: From the filters documentation: default, each type documents which fields are returned under the default ...
  • 4,696
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 ...
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....
  • 12.8k
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 ...
  • 12.8k
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 ...
  • 12.8k
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, ...
  • 6,292
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 ...
  • 6,292

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