Skip to content

Instantly share code, notes, and snippets.

@NaotoKumagai
Created October 10, 2016 21:40
Show Gist options
  • Save NaotoKumagai/1966ef3ae90d85c7268c2373af68b3bf to your computer and use it in GitHub Desktop.
Save NaotoKumagai/1966ef3ae90d85c7268c2373af68b3bf to your computer and use it in GitHub Desktop.
ブログ用レスポンスデータ
2016/10/11 06:17:13 GET /customsearch/v1/?cx=【検索エンジンID】&key=【APIキー】&num=3&q=google&searchType=image HTTP/1.1
Host: www.googleapis.com
{
"kind": "customsearch#search",
"url": {
"type": "application/json",
"template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"
},
"queries": {
"request": [
{
"title": "Google Custom Search - google",
"totalResults": "9490000000",
"searchTerms": "google",
"count": 3,
"startIndex": 1,
"inputEncoding": "utf8",
"outputEncoding": "utf8",
"safe": "off",
"cx": "【検索エンジンID】",
"searchType": "image"
}
],
"nextPage": [
{
"title": "Google Custom Search - google",
"totalResults": "9490000000",
"searchTerms": "google",
"count": 3,
"startIndex": 4,
"inputEncoding": "utf8",
"outputEncoding": "utf8",
"safe": "off",
"cx": "【検索エンジンID】",
"searchType": "image"
}
]
},
"context": {
"title": "画像検索用"
},
"searchInformation": {
"searchTime": 0.40547,
"formattedSearchTime": "0.41",
"totalResults": "9490000000",
"formattedTotalResults": "9,490,000,000"
},
"items": [
{
"kind": "customsearch#result",
"title": "Google Inc. - Android Apps on Google Play",
"htmlTitle": "\u003cb\u003eGoogle\u003c/b\u003e Inc. - Android Apps on \u003cb\u003eGoogle\u003c/b\u003e Play",
"link": "https://lh3.googleusercontent.com/0-BzaWtxoAnsBjQ_wzUcKxyF07XE7v2Kkg1ogPVUdzmQpvaz118uHQEGU6BdtzJuzfo=h1264",
"displayLink": "play.google.com",
"snippet": "Google Inc.",
"htmlSnippet": "\u003cb\u003eGoogle\u003c/b\u003e Inc.",
"mime": "image/",
"fileFormat": "Image Document",
"image": {
"contextLink": "https://play.google.com/store/apps/dev?id=5700313618786177705",
"height": 1264,
"width": 2247,
"byteSize": 51730,
"thumbnailLink": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTSIh3of_hFwzv_gJ86aI_K21gAwRnOTxL4w0cloLGXT4LeTPOJFfh3sJ6F",
"thumbnailHeight": 84,
"thumbnailWidth": 150
}
},
{
"kind": "customsearch#result",
"title": "Google (@google) | Twitter",
"htmlTitle": "\u003cb\u003eGoogle\u003c/b\u003e (@\u003cb\u003egoogle\u003c/b\u003e) | Twitter",
"link": "https://pbs.twimg.com/profile_images/762369348300251136/5Obhonwa.jpg",
"displayLink": "twitter.com",
"snippet": "Google (@google) | Twitter",
"htmlSnippet": "\u003cb\u003eGoogle\u003c/b\u003e (@\u003cb\u003egoogle\u003c/b\u003e) | Twitter",
"mime": "image/jpeg",
"image": {
"contextLink": "https://twitter.com/google",
"height": 512,
"width": 512,
"byteSize": 18136,
"thumbnailLink": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTn1QWRW0kJVs8Uytg6WSeIQbJoZtBuTkC-gVFmDl3J19QOfdibOLuzle3y",
"thumbnailHeight": 131,
"thumbnailWidth": 131
}
},
{
"kind": "customsearch#result",
"title": "Google - YouTube",
"htmlTitle": "\u003cb\u003eGoogle\u003c/b\u003e - YouTube",
"link": "https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg",
"displayLink": "www.youtube.com",
"snippet": "Google - YouTube",
"htmlSnippet": "\u003cb\u003eGoogle\u003c/b\u003e - YouTube",
"mime": "image/jpeg",
"image": {
"contextLink": "https://www.youtube.com/user/Google",
"height": 900,
"width": 900,
"byteSize": 31273,
"thumbnailLink": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS5ZdpBJrE4SAAcDdOdRjFDbi78-qLkpWuHpiC6MMNxkB_LdPO0pcb-CemNCw",
"thumbnailHeight": 146,
"thumbnailWidth": 146
}
}
]
}
Process finished with exit code 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment