Google Custom Search date range - date-range

I've been trying to set a daterange for the results I get on Google Custom Search but couldn't figure out how yet.
My url, so far, looks like this:
https://www.googleapis.com/customsearch/v1?key=MY_KEY&cx=MY_OTHER_KEY&q=bigdata&alt=json&fields=queries(request,nextPage),items(title,link,snippet)&cr=&start=1
I'm trying to get, for example, the results inside the range of 01/01/2014 to 02/01/2014. Is there any way to do it?

Related

Is there a method to retrieve first empty row in a Google spreadsheet with API?

I'm trying to retrieve the first empty row in a Google spreadsheet.
I'm aware of the SpreadsheetApp class, however I'm using Google sheet's API (Rust). Is it possible to use something similar to getLastRow() with Spreadsheet API?

Scraping SofaScore votes using Xpath and google sheets

I'm trying to scrape the votes from SofaScore with google sheets using the importxml function.
I'm running into an issue because the class name has a random string at the end of it.
Example "class="sc-5b0433e1-5 koUsvm"
Lets use https://www.sofascore.com/washington-nationals-new-york-mets/ExbsFtc as an example link.
Typically I would just use something similar to the code below.
//div[contains(#class= 'sc-5b0433e1-5')]
Does anyone know how to go about this.
JS elements are not supported by google sheets importxml formula:

Google Sheets API strips out links

I'm fetching some data from Google Sheets via Node, but the API only returns the text value when there's a hyperlink present. I've searched for solutions, and everyone seems to say to add valueRenderOption: 'FORMULA' to your API call, but that still doesn't do anything for me because it doesn't look like these links are applied via the HYPERLINK formula; the user is highlighting text, hitting CMD/CTRL + K, and creating a link that way because when I select the cell, the formula field is empty.
Figured it out. Looks like you can't use spreadsheets.values.get in this case. You have to use spreadsheets.get and pass includeGridData: true.

Building a formula that builds a URL with variables from cells (which will be keywords)

Google Sheets... Basically... I want to build a URL (it'll be a boolean site: search) where one cell field will be the website that is searched and another cell will be the keywords to search for. If there are more than one keywords in the field it'll need to replace the spaces with + signs in the URL.
Example is I have 'opentoexport.com' in a cell for the website and 'this is a test' in the field for the search term/keywords. It needs to build a URL that replace the spaces in the search term with + signs like this - google.co.uk/?gws_rd=ssl#q=site:opentoexport.com+this+is+a+test.
To try to make it clearer what I mean, I want some kind of formula that would make a URL like google.co.uk/?gws_rd=ssl#q=site:(Cell C:4)+(Cell A:4) where C:4 was the website I wanted to do a site: search of and C:4 would be keywords. The keywords in C:4 have spaces between them and the URL needs those spaces to be a + sign instead.
The formula I've tried so far is =CONCAT("google.co.uk/?gws_rd=ssl#q=site:($C4)+($A4))") which doesn't work.
The info in C4 is 'opentoexport.com' which is the website I want to do the site search of on Google.
The info in A4 are the keywords which is the search term I want to use on Google for the site: search, which in this instance is 'articles export market'. I want it to create https://www.google.co.uk/?gws_rd=ssl#q=site:opentoexport.com+this+is+a+test.
Here is an example of the sheet I'm using... https://goo.gl/RHEXce
Could anyone help? It seems complicated but I'm hoping someone who knows what they're doing might be able to make it simple?
note i've had to mess with the URLs to allow myself to post because it warned I had too many links
Does this formula work as you want:
="https://www.google.co.uk/?gws_rd=ssl#q=site:"&C4&"+"&SUBSTITUTE(A4," ","+")

Google Search Appliance querying date meta field with given range

I want to send a query to the Google Search Appliance that includes date range criteria of a meta field (lets call it metaDate). For example: metaDate field between 01.01.2010 and 01.01.2015. How can i construct a query such like this?
Mohan's not entirely correct. You can perform range searches on any metadata attribute. This is different then the document date. See Google's Documentation for this.
Also you can create a dynamic navigation element and test the format yourself. Dynamic Navigation can be used to construct range searches.
You have to tell GSA to use metaDate as Lastmodifieddate either by adding it as Last-Modified response header or by configuring Document Dates in GSA admin console for metaDate. After the changes, reindex your documents and fire a date range query along with the query term.
For example, q=someterm daterange:2010-01-01..2015-01-01

Resources