Currently, the title parameter, documented as follows:
stringtitle GET
(optional) Filters results by keyword or phrase in the Title.
is case-sensitive, in that the We the People API will only return titles which contain the case-sensitive title argument.
For example, if a developer searches for https://api.whitehouse.gov/v1/petitions.json?title=westboro, no results will be returned:
{"metadata":{"responseInfo":{"status":200,"developerMessage":"OK"},"executionTime":0.02},"results":[],"noresults":1}
Case-insensitivity for title and body searching should be default or be a provided as a parameter to developers who want case-insensitive searching in their apps. This would greatly simplify the developers workflow and can prevent frustrating cases where the the user cannot find a petition due to special casing.
One example would be where a user cannot find a petition containing "tornado" (case-insensitively) because the only petition containing "tornado" in the title actually contains "tOrnAdo", thus We the People API returns 0 results. This is a hypothetical example to illustrate my point.
Currently, the title parameter, documented as follows:
string title GET (optional) Filters results by keyword or phrase in the Title.
is case-sensitive, in that the We the People API will only return titles which contain the case-sensitive title argument.
For example, if a developer searches for https://api.whitehouse.gov/v1/petitions.json?title=westboro, no results will be returned:
{"metadata":{"responseInfo":{"status":200,"developerMessage":"OK"},"executionTime":0.02},"results":[],"noresults":1}
On the other hand, if a developer searches for https://api.whitehouse.gov/v1/petitions.json?title=Westboro or https://api.whitehouse.gov/v1/petitions.json?title=WESTBORO, then many petitions are returned.
Case-insensitivity for title and body searching should be default or be a provided as a parameter to developers who want case-insensitive searching in their apps. This would greatly simplify the developers workflow and can prevent frustrating cases where the the user cannot find a petition due to special casing.
One example would be where a user cannot find a petition containing "tornado" (case-insensitively) because the only petition containing "tornado" in the title actually contains "tOrnAdo", thus We the People API returns 0 results. This is a hypothetical example to illustrate my point.