Web-based service interface

Source: Internet
Author: User

Currently, there are some web-based service interfaces on the network, which are not necessarily the soap-based Web service interfaces. Most of the time, I prefer to expose a URL. The developer passes in the query parameter to return the XML or Jason data interface. For example:

 
1. wiki Interface

 

Http://en.wiktionary.org/w/api.php? Action = query & prop = revisions & titles = % S & rvprop = content & format = JSON

 

Here, the titles parameter can be any word. In a special format, the specific word of a day is returned by wiktionary: word of the day/October 26.

Note that the call must be encoded using the Javascript encodeuri or encodeurlcomponent.

 

Wiktionary: word of the day/October 26 can be encoded into two types

Encodeurl:

Wiktionary: Word % 20of % 20the % 20day/October % 2021

 

It looks like escape or encodeurlcomponent:

Wiktionary % 3 aword + of + the + day % 2 foctober + 21

 

 

2. Google weather

 

Http://www.google.com/ig/api? Weather = % S & HL = ZH-CN

In China, the weather parameter can be the Pinyin of the city. For example, the weather forecast for Shanghai in the next three days:

Http://www.google.com/ig/api? Weather = Shanghai & HL = ZH-CN

 

 

3. Yahoo Finance (stock data)

The returned result is in CSV format.

Http://download.finance.yahoo.com/d/quotes.csv? F=sl1d1t1ohgv&e;.csv & s = IBM, NOK, HMC

 

4. Wikipedia

 

The returned webpage file needs to be parsed (the information box on the right is a number of three tuples), not a direct Web Service Interface

Http://en.wikipedia.org/wiki/Nokia

 

The returned webpage is in the triple format.

Http://dbpedia.org/page/Nokia

 

5. Google Reader RSS Export

 

Https://www.google.com/reader/atom/feed/http://echohfut.iteye.com/rss? N = 150

In the URL, the feed can be followed by other RSS URLs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.