What url should I use - forms

I'm using this to search Google from my website:
<form method="get" action="http://www.google.nl/search">
What url should I use to search images and videos? I couldn't find anything on the internet.

To search Images:
http://www.google.nl/imghp?hl=nl&tab=ni
To search Video:
http://video.google.nl/?hl=nl&tab=wv

I believe you could just use the same URLs that show up after searching on Images/Videos. Here's the result for the string "cookies":
http://images.google.com/search?tbm=isch&hl=en&source=hp&biw=1280&bih=570&q=cookies&gbv=2&oq=cookies&aq=f&aqi=g10&aql=&gs_sm=e&gs_upl=1208l1498l0l1658l4l2l0l0l0l0l143l220l1.1l2l0
After messing around with the query parameters a bit, I was able to eliminate everything except the requirements for an image search:
http://www.google.com/search?q=cookies&tbm=isch
Looks as though &tbm needs to be passed in, and in your case could be a hidden input in HTML:
Change it to this for videos:

To search Images --- http://www.google.com/imghp
To search Videos --- http://video.google.com/?hl=en&tab=iv
But to integrate more efficiently in application better to use.
JSON/Atom Custom Search API
The JSON/Atom Custom Search API lets you develop websites and programs to retrieve and display search results from Google Custom Search programmatically. With this API, you can use RESTful requests to get search results in either JSON or Atom format

Related

Single Line Address for MapQuest

I'm trying to provide other map options besides just Google. Unfortunately a single HTTP query (e.g. location=123+main+street) only seems to be readily supported by Google.
I had no luck trying to find anything about embedding in the documentation and decided to email them directly:
The MapQuest business products
(https://developer.mapquest.com/documentation/) support both single
line input "location=1555+Blake+St+Denver+CO+80202+US" and the
advanced, 5-box method
("street=1555+Blake+St&city=Denver&state=CO&postalCode=80202&country=US").
Our API and SDK also lets you add the mapping/geocoding/routing
functions to your site without embedding links to the consumer site at
www.MapQuest.com.
Okay, so location=123+main+street should be supported in theory. However no example was provided. So using the iframe URL from the more client-oriented approach I tried the following without luck:
https://www.mapquest.com/embed/?location=1555+Blake+St+Denver+CO+80202+US
That just shows the map of the US as a whole.
How do I get the single HTTP query location to work for MapQuest embedding?
Correct: location=1555+Blake+St+Denver+CO+80202+US (single HTTP query).
Incorrect: street=1555+Blake+St&city=Denver (multiple HTTP queries).
It looks like a mix of MapQuest APIs and MapQuest.com. Check out the Link to MapQuest documentation. I think the Map a Location > Fielded Location is what you're after.
On this page: https://developer.mapquest.com/documentation/tools/link-to-mapquest/
Scroll down to Link to MapQuest Wizard.
Click on Map a Location.
Click on Single Line Location.
Click on the Run Sample with Embed View Specifier button.
Copy the URL from the new tab.
An example of the working MapQuest single HTTP query embedded page:
https://www.mapquest.com/embed/search/results?query=1555%20Blake%20St%20Denver%20CO%2080202&centerOnResults=1

How to determine if a given tweet is a video?

Let’s say I have two tweets:
https://twitter.com/BuzzFeed/status/917922958307295233
https://twitter.com/BuzzFeed/status/876083996026916865
I want to be able to quickly determine if the tweet contains a video. What is the best way to do that?
I’ve tried using oEmbed API, but it doesn’t give me the information I need.
https://dev.twitter.com/web/embedded-timelines/oembed
Posting a temporary answer
I have an access to the embedded html of the tweet. Thus, the first tweet example will have the embedded html of:
<blockquote class=\"twitter-tweet\" data-lang=\"en\"><a href=\"https://twitter.com/BuzzFeed/status/917922958307295233?ref_src=twsrc%5Etfw\" /></blockquote>
and second tweet example will have the embedded html of:
<blockquote class=\"twitter-video\" data-lang=\"en\"><a href=\"https://twitter.com/BuzzFeed/status/876083996026916865?ref_src=twsrc%5Etfw\" /></blockquote>
I can simply look at the blockquote class name to determine if the twitter is a video or a simple tweet.
This solution, however, will not work if you do not have access to the embedded html of the tweet, thus leaving this question still open for answers.
You can use the filter:videos advanced search operator in Twitter search to filter out only tweets containing videos like from:BuzzFeed filter:videos for example. Such filter can be coupled with other filters and/or Boolean arguments to make sure you narrow the search to only the tweets you wish to verify.

Bing Custom Search - thumbnail near each search result

Last couple years for the search function on our website, we used Google Custom Search.
Since the service will be disabled - we recently switched from GCS to Bing Custom Search (https://customsearch.ai/)
Currently, we can't retrieve thumbnail images for the each row in search results. Is it possible with Bing Custom Search? I mean - we want to display page thumbnail from the Bing near each search result.
Custom search provides contentUrl for each result in json that is not a page preview but image that you can associate with the result. You could use that as a thumbnail, if that helps.

Google Custom Search Element: Styling Ads

I added a Google Custom Search Element to my website. I already modified the look and feel of the CSE to my website, but I can't modify the look of the ads element since it is inside an Iframe.
Does anybody know how to set-up the style of the ads Iframe? I want do put in a background color and change the font.
Thanks!
This feature seems to be available only for Google Site Search customers. If you are one, you'll be able to recieve your search results as an XML feed, and apply a presentation layer on the raw data. All the details on how to do this are available at the official Google Custom Search site.
You can try this api for AdSence search - https://developers.google.com/custom-search-ads/docs/implementation-guide?hl=en , but you can't make ads view like search results.

Google feed api integration with iPhone/Objective C

I am building an RSS Reader. Some of the existing ones out there (for example, Pulse News for iPhone/iPad) have a search box where you can search for some term (example - "sports") and it will return a list of feeds that match your search criteria. So in this example, you type in "sports", and it searches and then comes back with ESPN.com's news feed, Yahoo! Sports' news feed, etc. etc.
After initial research, I found out that Google feed API does the same.
https://code.google.com/intl/fr/apis/ajaxfeeds/documentation/reference.html#findFeeds
However, I cant figure out how to use the google feed api. It returns the xml that i need to parse but the part I am confused is how to call the API and where to catch the xml response. Can some one post a tutorial or some help on how to integrate it.
Found a suitable solution with "Google Feed API" itself. They also have a JSON API(wow!!) which returns the JSON file for any query fired..
Here is the link:
https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=
e.g:
https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=News