google.smd 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. {
  2. // Google Ajax API SMD as defined by:
  3. // http://code.google.com/apis/ajaxsearch/documentation/reference.html
  4. // PLEASE Read the Google Terms of Service:
  5. // http://code.google.com/apis/ajaxsearch/terms.html
  6. "SMDVersion": "2.0",
  7. "id": "http://ajax.googleapis.com/ajax/services/search/",
  8. "description": "Google Ajax API",
  9. "transport": "JSONP",
  10. "envelope": "URL",
  11. "additionalParameters": true,
  12. "parameters": [
  13. // the most important param, the search query:
  14. { "name": "q", optional: false, "default":"" },
  15. // Google doesn't require, but appreciates, you using an API key
  16. // see: http://code.google.com/apis/ajaxsearch/signup.html
  17. // { "name": "key", optional: true, "default": "[enter your key]" },
  18. // result size: large | small (8 or 4 per page)
  19. { "name": "rsz", optional:true, "default": "small" },
  20. // language selection:
  21. { "name": "hl", optional:true, "default": "en" },
  22. // starting offset
  23. { "name": "start", optional:true, "default": 0 },
  24. { "name": "alt", optional:false, "default": "json" },
  25. // API version: only 1.0 supported
  26. { "name": "v", optional:false, "default": "1.0" }
  27. ],
  28. "services": {
  29. "webSearch": {
  30. "target": "http://ajax.googleapis.com/ajax/services/search/web",
  31. "parameters": [
  32. { "name": "cx", "type":"string", "optional":true }, // unique id
  33. { "name": "cref", "type":"string", "optional":true }, // linked custom search engine
  34. { "name": "safe", "type":"string", "optional":true }, // active | moderate | off
  35. // lr: see: http://www.google.com/coop/docs/cse/resultsxml.html#languageCollections
  36. { "name": "lr", "type":"string", "optional":true } // restrict to lang
  37. ]
  38. },
  39. "localSearch": {
  40. "target": "http://ajax.googleapis.com/ajax/services/search/local",
  41. "parameters": [
  42. // comma separated lat,long value to use for center
  43. { "name": "sll", "type": "string", "optional": true },
  44. { "name": "sspn", "type":"string", "optional": true } // bounding box?
  45. ]
  46. },
  47. "videoSearch": {
  48. "target": "http://ajax.googleapis.com/ajax/services/search/video",
  49. "parameters": [
  50. // ordering, set "d" to order by date, "default": by relevance
  51. { "name": "scoring", "type": "string", "optional": true }
  52. ]
  53. },
  54. "blogSearch": {
  55. "target": "http://ajax.googleapis.com/ajax/services/search/blogs",
  56. "parameters": [
  57. // see videoSearch params
  58. { "name": "scoring", "type": "string", "optional": true }
  59. ]
  60. },
  61. "newsSearch": {
  62. "target": "http://ajax.googleapis.com/ajax/services/search/news",
  63. "parameters": [
  64. { "name": "scoring", "type": "string", "optional": true },
  65. // geo: scope search to location. supply city, state, country, or zipcode
  66. // using geo makes "q" param optional
  67. { "name": "geo", "type":"string", optional:true }
  68. ]
  69. },
  70. "bookSearch": {
  71. "target": "http://ajax.googleapis.com/ajax/services/search/books",
  72. "parameters": [
  73. // set to "1" to only include full books
  74. { "name":"as_brr", "optional": true, "type":"number" },
  75. // restrict search to user-defined library
  76. { "name":"as_list", "optional": true, "type":"string" }
  77. ]
  78. },
  79. "imageSearch": {
  80. "target": "http://ajax.googleapis.com/ajax/services/search/images",
  81. "parameters": [
  82. // safe: active | moderate | off
  83. { "name": "safe", "type":"string", "optional":true },
  84. // limit image size: one of: icon, small|medium|large|xlarge, xxlarge, huge
  85. { "name": "imgsz", "type":"string", "optional": true },
  86. // limit image color: one of: mono|gray|color
  87. { "name": "imgc", "type":"string", "optional": true },
  88. // use "face" to limit to mugshots
  89. { "name": "imgtype", "type":"string", "optional": true },
  90. // limit to file "type": jpg|png|gif|bmp
  91. { "name": "as_filetype", "type": "string", "optional": true },
  92. // limit results to domain:
  93. { "name": "as_sitesearch", "type": "string", "optional": true }
  94. ]
  95. },
  96. "getFeed": {
  97. "target": "http://ajax.googleapis.com/ajax/services/feed/load",
  98. // pass a feed URL in the q parameter
  99. "parameters": []
  100. },
  101. "translate" : {
  102. "target" : "http://ajax.googleapis.com/ajax/services/language/translate",
  103. "parameters": [
  104. // A String like "en|es" (for english -> spanish)
  105. { "name":"langpair", "type":"string", optional:false }
  106. ]
  107. }
  108. }
  109. }