nnnjjj123
2020-11-17 1b2c1edb61190eeb19f465ff031eaa3b2a1b8dbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
    // 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 }
            ]
        }
        
    }
}