I'm trying to create a filter by following the documentation, but a few things are quite unclear:

  1. How do I create a filter that does not have a base filter?

  2. I'm creating a filter without a base so I can only fetch certain fields, but the responses have no data at all. What am I doing wrong?

  3. I'm trying to include or exclude multiple fields in a filter. What's the delimiter?


2 Answers 2


I have experimentally determined that:

  1. The base parameter must be passed a value of none to create a filter without a base.

  2. Fields in the default wrapper object can be filtered; you must include .items in your filter to receive any data from inside it. (The base filter does; this is why filters with a base don't have this problem.)

  3. This is technically a vector parameter; so, as with all vectors in the API, the delimiter is ; (U+0003B SEMICOLON).


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 Stack Exchange API to create my filter (same as you). I just wanted to include my three attributes and thus set the following parameters:

include: user.up_vote_count;user.down_vote_count;user.view_count
exclude: <left empty>
base: <left empty>
unsafe: false

That created my desired response (I have shortened the code below to save some space):

  "items": [
      "included_fields": [
      "filter_type": "safe",
      "filter": "!-*f(6q9Y*ecs"
  "has_more": false,
  "quota_max": 10000,
  "quota_remaining": 9989

I have written down the filter value


and used that as a parameter when fetching the user object (in my case I used the py-stackexchange wrapper):

so_user_obj = so.user(so_user_id, filter='!-*f(6q9Y*ecs')

It worked like a charm.

So, to answer your questions:

  1. As shown above
  2. As shown above
  3. Semicolon worked for me.

HTH, André

You must log in to answer this question.