VSCode Search text in files API - vscode-extensions

is there an API that returns the search results in a workspace like in the search tab. The only thing i could find is this proposed api from 2018,
https://code.visualstudio.com/updates/v1_26#_proposed-extension-apis

Related

Can i get all task by inputting asana search url?

If we search on asana UI we get a unique url to every search. Using that url as input, through asana api can i get all tasks which were found in that url.
for eg.
Search URL : https://app.asana.com/0/search/12345678/90123456
has got 50 tasks, so through api (using some kind of input as url) can i get those 50 tasks alone?
NOTE: The search url is nothing but combinations of tags and some filters. I can do search by api searching directly through tags, but this seams little bit easy to get my searched tasks.
Please suggest if any solution.
We don't currently support sorting via the API. The URL contains an ID for the search and an ID for the task currently selected of the form "/0/search/[search id]/[task id]", so you can get the specific task easily with the API.
However, getting the results for the search via the API is not supported.

Google Search Api syntax for excludeTerms

In the api excludeTerms (string) Identifies a word or phrase that should not appear in any documents in the search results.
If I wanted to exclude job and company what would that look like.
In a google search it would be -job -company, but that does not seem to be working.
Found solution, by experimenting with api explorer.
https://developers.google.com/apis-explorer/?hl=en_US#p/customsearch/v1/
It is just a space between each value.

Removing PDFs, PPTs from google custom search

I want to remove all nonHTML content pages containing PPTs, DOCs ,PDFs from google custom search. I have tried various url patterns in my custom search engine , but it is still returning pdfs and ppts in search results .
Search features → Advanced → Websearch settings → Query Addition
Query Addition: Appends additional query parameters to the search. Search results will
be served using "OR" logic. Supported values: Any search term to add to user query.
Advanced Google Site Search features
https://support.google.com/customsearch/answer/3037004?hl=en
I added -filetype:pdf -filetype:ppt -filetype:doc and I'm not getting PDFs, DOCs, PPTs in results.

Multiple file types search using Google Custom Search API

I need to get Google search results for particular filetypes.
For example, in browser I would directly google search for "hyperloop filetype:pdf" and it will list out PDF files for "Hyperloop".
For this, my Google Custom Search request URI will be https://www.googleapis.com/customsearch/v1?key=MY_KEY&cx=MY_UNIQUE_ID&q=hyperloop&fileType=pdf
However, currently I would like to get search results for "hyperloop" of filetypes .ppt or .doc.
In browser, I would achieve this by googling "hyperloop filetype:ppt OR filetype:doc".
What will be my Search request URI equivalent for this query?
I could not find anything related to querying using multiple values for a single parameter in Google Custom Search Documentation.
Rather than doing
q=hyerloop&filetype=pdf
you can use
q=hyperloop%20filetype:pdf%20OR%20filetype:doc
use this its work
$url='https://www.googleapis.com/customsearch/v1?key=AIzaSyCJUGIb_tevRKD-Kxxi5f4&cx=010407088:onjj7gscy2g&q='. urlencode($keywords).'&filetype=doc&filetype=docx';
for me

Number of results from CSE do not match google total results number

In Google Custom Search Engine if I make a search like this:
https://www.googleapis.com/customsearch/v1?key={$apikey}&q=####KEYWORD#####&cref={$cref}&alt=json
with my $apikey and my $cref I get a json results that do not match with the results of google via browser.
I've configured my search engine to search all the web as described here but I've noticed that many results are missing, for example the ones from forums.
Is there a way to specify to CSE to search also the forums? I want to use the same results as google classic search.