5

For a given Trello board, how can I get the total number of cards on it if the number of cards exceeds 999?

The API documentation (see page) implies this is not possible since page * limit cannot exceed 1000.

For example, when I call https://api.trello.com/1/boards/ID/actions?key=KEY&token=TOKENfields=name&limit=999&page=1 it returns the following message.

page * limit must be less than 1000, requested 1998

2
  • It looks like you're trying to get actions, but you're talking about cards. Can you clarify what you want? Commented Mar 25, 2015 at 22:43
  • Hi Aaron, i need to count how many cards are included in a board. Commented Mar 26, 2015 at 15:54

4 Answers 4

4

Enter this in the JS console of your trello board

$(".list-card").length
2

You should be using the API route to get cards, not the one for actions. It would look something like:

https://api.trello.com/1/boards/ID/cards?key=KEY&token=TOKEN

2
  • i used this api, but it return 999 cards and searching for "page" in api documentations i saw "actions", so i tried to use boards/ID/actions. it would be great if /boards/ID/cards return also "Number Of Cards" Commented Mar 27, 2015 at 10:25
  • @AndreaBisello That route returns all of the cards matching filter. There is no need to do any sort of paging. Note that the default filter is visible - unless you specify something else, you are only getting non-archived cards on non-archived lists. Commented Mar 27, 2015 at 15:10
1

This is similar to @everConfusedGuy's answer, but in plain JS (without jQuery).

Enter this into the console of the page:

document.querySelectorAll(".list-card").length
1
  • @everConfusedGuy's answer doesn't contain any jQuery. As he says in his answer, it's javascript that you execute in your console.
    – Patrick
    Commented Jul 22, 2022 at 17:39
-6

I am using this extension for Chrome.

This extension show me the total cards that I have in my board.

enter image description here

1
  • 1
    This extension was built by the person who added this reply: @henrique-brugugnoli. It does 2 things you need to know before installing: 1: It requires access to all data on your computer and the websites you visit, it means that the app or extension can access almost anything (webcam, personal files), inside or outside of your browser. 2. Past versions injected affiliate code, ~23 trackers slow down browser
    – jmgarnier
    Commented Nov 13, 2016 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.