| { |
| // Google Ajax API SMD as defined by: |
| // http://code.google.com/apis/ajaxsearch/documentation/reference.html |
| // PLEASE Read the Google Terms of Service: |
| // http://code.google.com/apis/ajaxsearch/terms.html |
| |
| "SMDVersion": "2.0", |
| "id": "http://ajax.googleapis.com/ajax/services/search/", |
| "description": "Google Ajax API", |
| |
| "transport": "JSONP", |
| "envelope": "URL", |
| "additionalParameters": true, |
| |
| "parameters": [ |
| // the most important param, the search query: |
| { "name": "q", optional: false, "default":"" }, |
| |
| // Google doesn't require, but appreciates, you using an API key |
| // see: http://code.google.com/apis/ajaxsearch/signup.html |
| // { "name": "key", optional: true, "default": "[enter your key]" }, |
| |
| // result size: large | small (8 or 4 per page) |
| { "name": "rsz", optional:true, "default": "small" }, |
| |
| // language selection: |
| { "name": "hl", optional:true, "default": "en" }, |
| |
| // starting offset |
| { "name": "start", optional:true, "default": 0 }, |
| |
| { "name": "alt", optional:false, "default": "json" }, |
| |
| // API version: only 1.0 supported |
| { "name": "v", optional:false, "default": "1.0" } |
| ], |
| |
| "services": { |
| |
| "webSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/web", |
| "parameters": [ |
| { "name": "cx", "type":"string", "optional":true }, // unique id |
| { "name": "cref", "type":"string", "optional":true }, // linked custom search engine |
| { "name": "safe", "type":"string", "optional":true }, // active | moderate | off |
| // lr: see: http://www.google.com/coop/docs/cse/resultsxml.html#languageCollections |
| { "name": "lr", "type":"string", "optional":true } // restrict to lang |
| ] |
| }, |
| |
| "localSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/local", |
| "parameters": [ |
| // comma separated lat,long value to use for center |
| { "name": "sll", "type": "string", "optional": true }, |
| { "name": "sspn", "type":"string", "optional": true } // bounding box? |
| ] |
| }, |
| |
| "videoSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/video", |
| "parameters": [ |
| // ordering, set "d" to order by date, "default": by relevance |
| { "name": "scoring", "type": "string", "optional": true } |
| ] |
| }, |
| |
| "blogSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/blogs", |
| "parameters": [ |
| // see videoSearch params |
| { "name": "scoring", "type": "string", "optional": true } |
| ] |
| }, |
| |
| "newsSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/news", |
| "parameters": [ |
| { "name": "scoring", "type": "string", "optional": true }, |
| // geo: scope search to location. supply city, state, country, or zipcode |
| // using geo makes "q" param optional |
| { "name": "geo", "type":"string", optional:true } |
| ] |
| }, |
| |
| "bookSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/books", |
| "parameters": [ |
| // set to "1" to only include full books |
| { "name":"as_brr", "optional": true, "type":"number" }, |
| // restrict search to user-defined library |
| { "name":"as_list", "optional": true, "type":"string" } |
| ] |
| }, |
| |
| "imageSearch": { |
| "target": "http://ajax.googleapis.com/ajax/services/search/images", |
| "parameters": [ |
| // safe: active | moderate | off |
| { "name": "safe", "type":"string", "optional":true }, |
| // limit image size: one of: icon, small|medium|large|xlarge, xxlarge, huge |
| { "name": "imgsz", "type":"string", "optional": true }, |
| // limit image color: one of: mono|gray|color |
| { "name": "imgc", "type":"string", "optional": true }, |
| // use "face" to limit to mugshots |
| { "name": "imgtype", "type":"string", "optional": true }, |
| // limit to file "type": jpg|png|gif|bmp |
| { "name": "as_filetype", "type": "string", "optional": true }, |
| // limit results to domain: |
| { "name": "as_sitesearch", "type": "string", "optional": true } |
| ] |
| }, |
| |
| "getFeed": { |
| "target": "http://ajax.googleapis.com/ajax/services/feed/load", |
| // pass a feed URL in the q parameter |
| "parameters": [] |
| }, |
| |
| "translate" : { |
| "target" : "http://ajax.googleapis.com/ajax/services/language/translate", |
| "parameters": [ |
| // A String like "en|es" (for english -> spanish) |
| { "name":"langpair", "type":"string", optional:false } |
| ] |
| } |
| |
| } |
| } |