Board search returns no results

Searches of the format board: are not returning any results as of June 9 2021. I’ve tested using both the UI and API search and both return an empty result set for boards which have cards.

Example API request:

GET https://api.trello.com/1/search?query=board:&key=&token=

Response:

{
    "options": {
        "terms": [],
        "modifiers": [
            {
                "text": "board:<boardId>"
            }
        ],
        "modelTypes": [
            "cards"
        ],
        "partial": false
    },
    "cards": []
}

Searching in the UI with the query “board:” or “board:”"" also returns an empty result: “We couldn’t find any cards or boards that matched your search.”

I have permissions to retrieve cards on the given board. I am able to retrieve cards directly using the cards API:

GET https://api.trello.com/1/card/?&key=&token=

Interesting. Can you screenshot that? When you check out the Network tab in your browser console, do you see the request firing off to trello.com/1/ and a response coming back?

I wonder if this is the same issue I’m having?

Is there a bug in the Rest API when searching for specific boards?

The “board:” query is certainly broken when searching in the UI and over REST - no cards are returned when using it. Why are there no updates to this issue?

Hi @knorrest2, I noticed that the response in your query indicates you’re searching for modelTypes=cards but your URL has boards:.

Can you help me understand what it is you’re trying to accomplish? Maybe there’s a different or more efficient way to go about it?

Not sure what you mean by that, but I found this thread because I had the same problem as the reporter. That is, an API query for cards on boards with query string "board:\"BOARD-ID\"" that previously worked now returns no cards. So I tried the same thing in the UI with the same result - very simple, just a search specifying a board and nothing else. I don’t even have to write the complete query, just select one of Trellos suggestions

What I want is really just to make what has worked for the last two years work again - a simple search over the API for all cards on a board.

Hello @TasktopTechnologies and @bentley

I can confirm this same fault. A search via the REST API for all cards in particular board, using that board’s ID or name, will return an empty array for the cards:

However, if another modifier is added to the search, then the search works and the array of cards contains values:

The exact same fault can be replicated via a search using the web interface:

…with the extra modifier:

I suggest you log this as a Trello bug.

1 Like
  1. I didn’t know you could do that. :slight_smile:

  2. Forgive me. I’m not familiar with using the search through the API that much. I use the other routes a lot though. So, I’m curious what the advantage is to doing a query vs just the /boards/{{board_id}}/cards end point?

Hello @jrfischer

Well, if your goal was just to get all the cards in a board with no other criteria, there would be no advantage in using the Search endpoint compared to using the Get cards on a Board endpoint; it produces essentially the same result.

The Search endpoint is just more flexible and allows you to search for specific things with additional criteria to filter the results.

I guess it sort of compensates for Trello not having a object query language like JQL / CQL that Jira / Confluence have.

1 Like

@sunnyape - That makes sense. I personally just query the cards or lists I’m looking for and rely on the language I’m using to run queries on the data that comes back. If I’m smart about it it’s really reliable and very quick. But, I get the alure of search.