Stack Exchange Create Filter

Stack Exchange - Create Filter

Creates a new filter given a list of includes, excludes, a base filter, and whether or not this filter should be "unsafe". Filter "safety" is defined as follows. Any string returned as a result of an API call with a safe filter will be inline-able into HTML without script-injection concerns. That is to say, no additional sanitizing (encoding, HTML tag stripping, etc.) will be necessary on returned strings. Applications that wish to handle sanitizing themselves should create an unsafe filter. All filters are safe by default, under the assumption that double-encoding bugs are more desirable than script injections. If no base filter is specified, the default filter is assumed. When building a filter from scratch, the none built-in filter is useful. When the size of the parameters being sent to this method grows to large, problems can occur. This method will accept POST requests to mitigate this. It is not expected that many applications will call this method at runtime, filters should be pre-calculated and "baked in" in the common cases. Furthermore, there are a number of built-in filters which cover common use cases. This method returns a single filter.

Posted on:


API Description


Stack Exchange


After someone asks a question, members of the community propose answers. Others vote on those answers. Very quickly, the answers with the most votes rise to the top. You dont have to read through a lot of discussion to find the best answer. Like to...

Curl command through

curl -v "{streamdata_token}&base={field_value}&exclude={field_value}&include={field_value}&unsafe={field_value}"

Return to Main Page

Submit Your API

Join the gallery to find out how much you can save with