{"command":{"effect":"read","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>tasks:read</code>\n\nTo mirror the functionality of the Asana web app's advanced search feature, the Asana API has a task search endpoint that allows you to build complex filters to find and retrieve the exact data you need.\n#### Premium access\nLike the Asana web product's advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true:\n\n- The workspace in which the search is being performed is a premium workspace\n- The user is a member of a premium team inside the workspace\n\nEven if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a `402 Payment Required` error.\n#### Pagination\nSearch results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional [pagination](/docs/pagination) available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the `limit` query parameter.\n#### Eventual consistency\nChanges in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a task that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product.\nBecause of this delay, the search endpoint is not suited for use cases that require immediate consistency after writes. If you need read-your-write behavior or strongly consistent results, we recommend using [Get multiple tasks](/reference/gettasks) instead.\n#### Rate limits\nYou may receive a `429 Too Many Requests` response if you hit any of our [rate limits](/docs/rate-limits).\n#### Custom field parameters\n| Parameter name | Custom field type | Accepted type |\n|---|---|---|\n| custom_fields.{gid}.is_set | All | Boolean |\n| custom_fields.{gid}.value | Text | String |\n| custom_fields.{gid}.value | Number | Number |\n| custom_fields.{gid}.value | Enum | Enum option ID |\n| custom_fields.{gid}.value | Date | ISO 8601 date string (yyyy-mm-dd) |\n| custom_fields.{gid}.starts_with | Text only | String |\n| custom_fields.{gid}.ends_with | Text only | String |\n| custom_fields.{gid}.contains | Text only | String |\n| custom_fields.{gid}.less_than | Number only | Number |\n| custom_fields.{gid}.greater_than | Number only | Number |\n| custom_fields.{gid}.before | Date only | ISO 8601 date string (yyyy-mm-dd) |\n| custom_fields.{gid}.after | Date only | ISO 8601 date string (yyyy-mm-dd) |\n\n\nFor example, if the gid of the custom field is 12345, the query parameter to find tasks where it is set would be `custom_fields.12345.is_set=true`. To match an exact value for an enum custom field, use the gid of the desired enum option and not the name of the enum option: `custom_fields.12345.value=67890`. To find tasks with a date custom field before April 21, 2026, use `custom_fields.12345.before=2026-04-21`.\n\n**Not Supported**: searching for multiple exact matches of a custom field, searching for multi-enum custom field\n\n#### Custom task type parameters\n| Parameter name | Accepted type |\n|---|---|\n| custom_types.{gid}.custom_type_status_option.gid | Enum option GID |\n\nThis parameter filters tasks by their custom task status option. The `{gid}` is the GID of the custom task type, and the value is the GID of a valid status option for that type's status field.\n\n**Requirements**:\n- `resource_subtype=custom` must be set when using this parameter.\n- Only one `custom_types.*` parameter may be specified per request.\n- The provided custom task type GID must reference a valid custom object type.\n- The status option GID must be a valid option for the custom type's status field.\n- Cannot be combined with `custom_fields.{status_field_gid}.value` when `{status_field_gid}` is the status field belonging to the same custom task type.\n\nFor example, to find custom tasks of type `12345` with status option `67890`: `custom_types.12345.custom_type_status_option.gid=67890&resource_subtype=custom`.\n\n*Note: If you specify `projects.any` and `sections.any`, you will receive tasks for the project **and** tasks for the section. If you're looking for only tasks in a section, omit the `projects.any` from the request.*","properties":{"path":{"type":"object","properties":{"workspace_gid":{"type":"string","examples":["12345"],"description":"Globally unique identifier for the workspace or organization."}},"required":["workspace_gid"],"additionalProperties":false},"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging."},"limit":{"type":"integer","minimum":1,"maximum":100,"examples":[50],"description":"Results per search response.\nThe number of objects to return in one search response. The value must be between 1 and 100. Search responses have no `next_page`, so to retrieve further results, sort by `created_at` and repeat the query with a `created_at.before` or `created_at.after` filter that excludes the results you have already seen."},"text":{"type":"string","examples":["Bug"],"description":"Performs full-text search on both task name and description"},"resource_subtype":{"type":"string","enum":["default_task","milestone","approval","custom"],"default":"milestone","description":"Filters results by the task's resource_subtype"},"assignee.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"assignee.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"portfolios.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of portfolio IDs"},"projects.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of project IDs. Returns tasks that are directly in these projects or inherit them from an ancestor task."},"projects.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of project IDs"},"projects.all":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of project IDs"},"sections.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of section or column IDs"},"sections.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of section or column IDs"},"sections.all":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of section or column IDs"},"tags.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of tag IDs"},"tags.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of tag IDs"},"tags.all":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of tag IDs"},"teams.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of team IDs"},"followers.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"followers.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"created_by.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"created_by.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"assigned_by.any":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"assigned_by.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"liked_by.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"commented_on_by.not":{"type":"string","examples":["12345,23456,34567"],"description":"Comma-separated list of user identifiers. This can either be the string \"me\", an email, or the gid of a user."},"due_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"due_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"due_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`"},"due_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"due_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"start_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"start_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"start_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`"},"created_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"created_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"created_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`"},"created_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"created_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"completed_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"completed_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"completed_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`"},"completed_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"completed_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"modified_on.before":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"modified_on.after":{"type":"string","format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string"},"modified_on":{"type":["string","null"],"format":"date","examples":["2019-09-15"],"description":"ISO 8601 date string or `null`"},"modified_at.before":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"modified_at.after":{"type":"string","format":"date-time","examples":["2019-04-15T01:01:46.055Z"],"description":"ISO 8601 datetime string"},"is_blocking":{"type":"boolean","examples":[false],"description":"Filter to incomplete tasks with dependents"},"is_blocked":{"type":"boolean","examples":[false],"description":"Filter to tasks with incomplete dependencies"},"has_attachment":{"type":"boolean","examples":[false],"description":"Filter to tasks with attachments"},"completed":{"type":"boolean","examples":[false],"description":"Filter to completed tasks"},"is_subtask":{"type":"boolean","examples":[false],"description":"Filter to subtasks"},"sort_by":{"type":"string","enum":["due_date","created_at","completed_at","likes","modified_at","relevance"],"default":"modified_at","examples":["likes"],"description":"One of `due_date`, `created_at`, `completed_at`, `likes`, `relevance`, or `modified_at`, defaults to `modified_at`"},"sort_ascending":{"type":"boolean","default":false,"examples":[true],"description":"Default `false`"},"opt_fields":{"type":"array","items":{"type":"string","enum":["actual_time_minutes","approval_status","assigned_by","assigned_by.name","assignee","assignee.name","assignee_section","assignee_section.name","assignee_status","completed","completed_at","completed_by","completed_by.name","created_at","created_by","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.default_access_level","custom_fields.description","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.format","custom_fields.has_notifications_enabled","custom_fields.html_text_value","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_lookup_field","custom_fields.is_value_read_only","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.privacy_setting","custom_fields.reference_value","custom_fields.reference_value.name","custom_fields.representation_type","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","custom_type","custom_type.asana_created_type_identifier","custom_type.name","custom_type_status_option","custom_type_status_option.name","dependencies","dependents","due_at","due_on","effective_memberships","external","external.data","followers","followers.name","has_subtasks_date_mismatch","hearted","hearts","hearts.user","hearts.user.name","html_notes","is_rendered_as_separator","liked","likes","likes.user","likes.user.name","memberships","memberships.project","memberships.project.name","memberships.project.resource_subtype","memberships.section","memberships.section.name","modified_at","name","notes","num_hearts","num_likes","num_subtasks","parent","parent.created_by","parent.name","parent.resource_subtype","permalink_url","projects","projects.name","projects.resource_subtype","resource_subtype","start_at","start_on","tags","tags.name","workspace","workspace.name"]},"examples":[["actual_time_minutes","approval_status","assigned_by","assigned_by.name","assignee","assignee.name","assignee_section","assignee_section.name","assignee_status","completed","completed_at","completed_by","completed_by.name","created_at","created_by","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.default_access_level","custom_fields.description","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.format","custom_fields.has_notifications_enabled","custom_fields.html_text_value","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_lookup_field","custom_fields.is_value_read_only","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.privacy_setting","custom_fields.reference_value","custom_fields.reference_value.name","custom_fields.representation_type","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","custom_type","custom_type.asana_created_type_identifier","custom_type.name","custom_type_status_option","custom_type_status_option.name","dependencies","dependents","due_at","due_on","effective_memberships","external","external.data","followers","followers.name","has_subtasks_date_mismatch","hearted","hearts","hearts.user","hearts.user.name","html_notes","is_rendered_as_separator","liked","likes","likes.user","likes.user.name","memberships","memberships.project","memberships.project.name","memberships.project.resource_subtype","memberships.section","memberships.section.name","modified_at","name","notes","num_hearts","num_likes","num_subtasks","parent","parent.created_by","parent.name","parent.resource_subtype","permalink_url","projects","projects.name","projects.resource_subtype","resource_subtype","start_at","start_on","tags","tags.name","workspace","workspace.name"]],"description":"This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the [input/output options guide](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false}},"required":["path"],"additionalProperties":false},"name":"Search tasks in a workspace","id":"asana.searchtasksforworkspace","example":{"path":{"workspace_gid":"12345"}},"maxRequests":1,"summary":false}}