Is it possible to only get exact matches in a search API call?

A search returns close matches as well, but I only want exact matches. How can I achieve this with the API?

For example:
Searching for also pulls up results containing

Hi @Ashayna_Lucero,

(FYI I moved your post to the Developers & API forum section.)

Hmm, I’m surprised, that sounds like maybe a bug. Can you post the actual request code that you’re doing?

Thanks for moving it!

Here’s what I’m using:

pr_urls = ['']

for url in pr_urls: 
    api_response = api_instance.search_tasks_for_workspace(workspace_gid, text=url) 
    api_response_dict = api_response.to_dict()
    response_data = api_response_dict["data"]

The response_data I get back contains the metadata of 4 tasks – two of which do have this exact URL I’m searching for, but the other two contain similar, but not exact URLs.

Example of URL that is returned that I DON’T want:

I get the exact same results when searching using the UI.

I can only narrow down my search using parameters so much, I need to be able to look for tasks anywhere in the workspace that match the exact URL.

I guess that makes sense since I think they’re using the same underlying technology.

I’m not an advanced search expert; @ambforumleader team, what do you think? Is this “fuzzy search” expected behavior for advanced search?

Support confirmed searching for an exact match is currently not possible.

Sep 29, 2023, 12:30 AM PDT

Thank you for reaching out to us. I understand that you are looking for a way to only get exact matches in a search API call.

Currently there isn’t a way to search for exact match using our advanced search using API, similarly to the UI.

Having said that, I can easily understand your point and how it could improve Asana. For this reason, I have gone ahead and noted your report for our Product Team. I think it will be important for making our product more robust in the future. I also believe that these kinds of reports might encourage our engineers to implement this option.

Thanks for taking the time to share your feedback with us. It really helps us understand the needs of the people who use our product.

However, given that I am searching specifically for GitHub pull requests that are attached with the GitHub integration, I found that I am able to get attachments for the objects returned by the fuzzy search, get the attachment details, then check if the “view_url” is an exact match.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.