API search request returns empty cards


I have been experiencing a weird bug.
My app uses a trello API call to search cards: https://api.trello.com/1/search?query=<?>&modelTypes=cards&idBoards=<?>
6 and 2 months ago it worked flawlessly from both my account/IP and an other user’s account/IP.
Last week and now it still works from my account/IP but when running from the user’s account/IP it returns an empty ‘cards’ array. The user’s account is the same as it was. Moreover, the user still can perform the same search in his browser and see the card found in the web interface.
I’m not sure what makes the difference - account or IP but such a behavior looks wrong anyway.
Can an IP policy be involved there? Please give any hint how to overcome this.
Thank you.

Hello @SergeyStoyan

I have no idea how that query you’ve provided can work, as it’s constructed incorrectly. The only way it would work, would be if was constructed something like this:


  1. You can’t pass an empty query parameter, or you’ll get a 400 Invalid query parameter error.
  2. You can’t pass an empty idBoards parameter, or there is no scope for where to find the cards.

Are you completely, totally, 100% sure that the query you’ve shown in your question works??

well, I just deleted the values from the request because they are not important. As I told, the request works from my account/IP. Thanks for your reply anyway.

It appeared not a trello bug! It was because of wrong idBoards in the query:


My app just took the first board id of [boards] when searching the board by name. It worked before the client added one more board whose name consists of the first board name + another word so that there are 2 boards found by the same name. My app took the wrong board id and thus, searched for cards in the wrong board. As the second board is not shared with me, I could not experience the same problem.