Search Tasks API opt_fields - can I specify a set of custom_fields by id?

Hello,

I’m testing the search tasks API using PostMan to see if I can use it to fit a use-case that has been requested of me.

Specifically, I want to lookup all tasks that have been modified since a given date and have a specific custom field set (I don’t care to which value). This is all well and good, I can get this working just fine.

Because I’m testing and I want to validate that the results I’m getting are correct, I set the opt_fields parameter to custom_fields which works fine, but it gives me far more information than I need at this moment.

please imagine that I’m testing with a valid GID instead of 16 zeros.

Using opt_fields, is it possible to list a specific custom field by gid, such as opt_fields=custom_fields.0000000000000000 ?

I’ve tried setting opt_fields to custom_fields.0000000000000000 but that only returns the GID field for each of the custom fields that are set for each task.

I’ve tried setting opt_fields to custom_fields.display_value, custom_fields.gid, custom_fields.name, custom_fields.enum_value, custom_fields.0000000000000000 and while that did return the specified custom field properties, it includes all the custom fields and doesn’t only retrieve properties for the custom field with gid 0000000000000000.

Here’s the full request string but with redacted gid

https://app.asana.com/api/1.0/workspaces/:workspace_gid/tasks/search?resource_subtype=default_task&sort_by=modified_at&sort_ascending=false&modified_on.after=2025-09-23&custom_fields.0000000000000000.is_set=true&opt_fields=custom_fields.display_value, custom_fields.gid, custom_fields.name, custom_fields.enum_value, custom_fields.0000000000000000

I’ve read through a few forum posts, read through the input/output options in the API docs, and of course the search tasks endpoint documentation which is where I got the idea that I might be able to filter opt_fields to specify only a particular custom field.

Is this possible? Am I missing something? Any advice?

Thanks in advance :folded_hands:

No, that’s not possible; you can only get all custom fields. You’ll have to filter on your end to get the one you’re interested in.

Okay. Thanks for the quick reply and confirmation, @Phil_Seeman !