Run a filtered, paginated, sorted search for cards across one or more pipes of an organization, with a total match count.
Before You Begin
🔗 Use the GraphQL Playground to execute the queries in this guide.
➡️ New to GraphQL? Learn how to navigate the Playground with our Playground Basics Guide.
Prerequisites
- Authentication: Use a Service Account token (Personal Access Tokens are deprecated).
- Permissions: Your token must be able to
showthe organization and the report scope. Requests for an organization or pipes you cannot access return aPermission deniederror. - Organization ID and Pipe IDs: the organization to search within and the pipes to include in the results.
Step 1: Find Your Organization ID and Pipe IDs
- Organization ID: open the organization in the Pipefy UI — the URL contains it:
https://app.pipefy.com/organizations/300000000→ Organization ID =300000000. - Pipe ID: open the pipe — the URL contains it:
https://app.pipefy.com/pipes/1234→ Pipe ID =1234. - You can also retrieve both via the API — see our Get resource IDs page.
Step 2: Execute the Query
Use the cardSearch query to search cards across the selected pipes:
query CardSearch(
$organizationId: ID!
$pipeIds: [Int]!
$pagination: ReportPaginationInput!
$sortBy: ReportSortDirectionInput!
$filter: ReportCardsFilter
) {
cardSearch(
organizationId: $organizationId
pipeIds: $pipeIds
pagination: $pagination
sortBy: $sortBy
filter: $filter
) {
count
next_page
previous_page
wait
cards {
id
title
current_phase {
id
name
}
pipe {
id
name
}
}
}
}
With these Query Variables:
{
"organizationId": "300000000",
"pipeIds": [1234],
"pagination": { "page": 1, "perPage": 50 },
"sortBy": { "field": "title", "direction": "asc" },
"filter": {
"id": 1,
"operator": "and",
"groups": [
{
"id": 2,
"operator": "and",
"queries": [
{ "id": 3, "type": "string", "field": "title", "label": "Title", "operator": "eq", "value": "Invoice" }
]
}
],
"lastId": 0
}
}
Arguments Breakdown
organizationId: the organization whose cards are searched. Required.pipeIds: the pipes to include in the results. Required.pagination: how the results are paged (page,perPage). Required.sortBy: the sortfieldanddirectionof the results. Required.filter: a grouped query tree (ReportCardsFilter) describing the search conditions. Optional.partialPipeAccess: set totrueto search a single pipe the user only partially accesses. Optional.
Fields Breakdown
count: the total number of cards matching the search.next_page/previous_page: pagination cursors,nullwhen there is no further page.wait:truewhile the underlying index is still preparing the data — retry the call whentrue.cards: the matching cards. Each exposes the standardCardfields (e.g.id,title,current_phase,pipe).
Example Response
{
"data": {
"cardSearch": {
"count": 1,
"next_page": null,
"previous_page": null,
"wait": null,
"cards": [
{
"id": "987654321",
"title": "Invoice #42",
"current_phase": { "id": "111", "name": "To Do" },
"pipe": { "id": "1234", "name": "Finance" }
}
]
}
}
}
Key Notes
- Search is index-backed. When
waitistrue, the result set is still being prepared — retry the query. pipeIdsscopes the search. Only cards in the listed pipes (and visible to your token) are returned.partialPipeAccess. Whentrue, only one pipe may be passed inpipeIds; passing more returns an error.- Permission errors. If your token cannot
showthe organization or the report scope, the query returns aPermission deniederror. - Migrated from the Internal schema. This query is available on the standard API V1 schema. The legacy Internal field is deprecated but still functional; new integrations should use the field shown above.
