• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="urlshortener_v1.html">URL Shortener API</a> . <a href="urlshortener_v1.url.html">url</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#get">get(shortUrl, projection=None)</a></code></p>
79<p class="firstline">Expands a short URL or gets creation time and analytics.</p>
80<p class="toc_element">
81  <code><a href="#insert">insert(body)</a></code></p>
82<p class="firstline">Creates a new short URL.</p>
83<p class="toc_element">
84  <code><a href="#list">list(start_token=None, projection=None)</a></code></p>
85<p class="firstline">Retrieves a list of URLs shortened by a user.</p>
86<h3>Method Details</h3>
87<div class="method">
88    <code class="details" id="get">get(shortUrl, projection=None)</code>
89  <pre>Expands a short URL or gets creation time and analytics.
90
91Args:
92  shortUrl: string, The short URL, including the protocol. (required)
93  projection: string, Additional information to return.
94    Allowed values
95      ANALYTICS_CLICKS - Returns only click counts.
96      ANALYTICS_TOP_STRINGS - Returns only top string counts.
97      FULL - Returns the creation timestamp and all available analytics.
98
99Returns:
100  An object of the form:
101
102    {
103      "status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
104      "kind": "urlshortener#url", # The fixed string "urlshortener#url".
105      "created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
106      "analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
107        "week": { # Click analytics over the last week.
108          "shortUrlClicks": "A String", # Number of clicks on this short URL.
109          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
110            {
111              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
112              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
113            },
114          ],
115          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
116            {
117              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
118              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
119            },
120          ],
121          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
122            {
123              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
124              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
125            },
126          ],
127          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
128            {
129              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
130              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
131            },
132          ],
133          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
134        },
135        "allTime": { # Click analytics over all time.
136          "shortUrlClicks": "A String", # Number of clicks on this short URL.
137          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
138            {
139              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
140              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
141            },
142          ],
143          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
144            {
145              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
146              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
147            },
148          ],
149          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
150            {
151              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
152              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
153            },
154          ],
155          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
156            {
157              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
158              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
159            },
160          ],
161          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
162        },
163        "twoHours": { # Click analytics over the last two hours.
164          "shortUrlClicks": "A String", # Number of clicks on this short URL.
165          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
166            {
167              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
168              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
169            },
170          ],
171          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
172            {
173              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
174              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
175            },
176          ],
177          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
178            {
179              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
180              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
181            },
182          ],
183          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
184            {
185              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
186              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
187            },
188          ],
189          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
190        },
191        "day": { # Click analytics over the last day.
192          "shortUrlClicks": "A String", # Number of clicks on this short URL.
193          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
194            {
195              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
196              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
197            },
198          ],
199          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
200            {
201              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
202              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
203            },
204          ],
205          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
206            {
207              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
208              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
209            },
210          ],
211          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
212            {
213              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
214              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
215            },
216          ],
217          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
218        },
219        "month": { # Click analytics over the last month.
220          "shortUrlClicks": "A String", # Number of clicks on this short URL.
221          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
222            {
223              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
224              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
225            },
226          ],
227          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
228            {
229              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
230              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
231            },
232          ],
233          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
234            {
235              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
236              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
237            },
238          ],
239          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
240            {
241              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
242              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
243            },
244          ],
245          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
246        },
247      },
248      "longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
249      "id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
250    }</pre>
251</div>
252
253<div class="method">
254    <code class="details" id="insert">insert(body)</code>
255  <pre>Creates a new short URL.
256
257Args:
258  body: object, The request body. (required)
259    The object takes the form of:
260
261{
262    "status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
263    "kind": "urlshortener#url", # The fixed string "urlshortener#url".
264    "created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
265    "analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
266      "week": { # Click analytics over the last week.
267        "shortUrlClicks": "A String", # Number of clicks on this short URL.
268        "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
269          {
270            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
271            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
272          },
273        ],
274        "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
275          {
276            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
277            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
278          },
279        ],
280        "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
281          {
282            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
283            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
284          },
285        ],
286        "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
287          {
288            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
289            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
290          },
291        ],
292        "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
293      },
294      "allTime": { # Click analytics over all time.
295        "shortUrlClicks": "A String", # Number of clicks on this short URL.
296        "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
297          {
298            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
299            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
300          },
301        ],
302        "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
303          {
304            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
305            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
306          },
307        ],
308        "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
309          {
310            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
311            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
312          },
313        ],
314        "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
315          {
316            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
317            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
318          },
319        ],
320        "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
321      },
322      "twoHours": { # Click analytics over the last two hours.
323        "shortUrlClicks": "A String", # Number of clicks on this short URL.
324        "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
325          {
326            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
327            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
328          },
329        ],
330        "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
331          {
332            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
333            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
334          },
335        ],
336        "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
337          {
338            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
339            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
340          },
341        ],
342        "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
343          {
344            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
345            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
346          },
347        ],
348        "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
349      },
350      "day": { # Click analytics over the last day.
351        "shortUrlClicks": "A String", # Number of clicks on this short URL.
352        "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
353          {
354            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
355            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
356          },
357        ],
358        "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
359          {
360            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
361            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
362          },
363        ],
364        "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
365          {
366            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
367            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
368          },
369        ],
370        "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
371          {
372            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
373            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
374          },
375        ],
376        "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
377      },
378      "month": { # Click analytics over the last month.
379        "shortUrlClicks": "A String", # Number of clicks on this short URL.
380        "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
381          {
382            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
383            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
384          },
385        ],
386        "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
387          {
388            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
389            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
390          },
391        ],
392        "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
393          {
394            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
395            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
396          },
397        ],
398        "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
399          {
400            "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
401            "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
402          },
403        ],
404        "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
405      },
406    },
407    "longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
408    "id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
409  }
410
411
412Returns:
413  An object of the form:
414
415    {
416      "status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
417      "kind": "urlshortener#url", # The fixed string "urlshortener#url".
418      "created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
419      "analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
420        "week": { # Click analytics over the last week.
421          "shortUrlClicks": "A String", # Number of clicks on this short URL.
422          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
423            {
424              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
425              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
426            },
427          ],
428          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
429            {
430              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
431              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
432            },
433          ],
434          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
435            {
436              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
437              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
438            },
439          ],
440          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
441            {
442              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
443              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
444            },
445          ],
446          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
447        },
448        "allTime": { # Click analytics over all time.
449          "shortUrlClicks": "A String", # Number of clicks on this short URL.
450          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
451            {
452              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
453              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
454            },
455          ],
456          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
457            {
458              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
459              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
460            },
461          ],
462          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
463            {
464              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
465              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
466            },
467          ],
468          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
469            {
470              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
471              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
472            },
473          ],
474          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
475        },
476        "twoHours": { # Click analytics over the last two hours.
477          "shortUrlClicks": "A String", # Number of clicks on this short URL.
478          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
479            {
480              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
481              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
482            },
483          ],
484          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
485            {
486              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
487              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
488            },
489          ],
490          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
491            {
492              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
493              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
494            },
495          ],
496          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
497            {
498              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
499              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
500            },
501          ],
502          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
503        },
504        "day": { # Click analytics over the last day.
505          "shortUrlClicks": "A String", # Number of clicks on this short URL.
506          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
507            {
508              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
509              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
510            },
511          ],
512          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
513            {
514              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
515              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
516            },
517          ],
518          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
519            {
520              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
521              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
522            },
523          ],
524          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
525            {
526              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
527              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
528            },
529          ],
530          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
531        },
532        "month": { # Click analytics over the last month.
533          "shortUrlClicks": "A String", # Number of clicks on this short URL.
534          "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
535            {
536              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
537              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
538            },
539          ],
540          "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
541            {
542              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
543              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
544            },
545          ],
546          "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
547            {
548              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
549              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
550            },
551          ],
552          "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
553            {
554              "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
555              "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
556            },
557          ],
558          "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
559        },
560      },
561      "longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
562      "id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
563    }</pre>
564</div>
565
566<div class="method">
567    <code class="details" id="list">list(start_token=None, projection=None)</code>
568  <pre>Retrieves a list of URLs shortened by a user.
569
570Args:
571  start_token: string, Token for requesting successive pages of results.
572  projection: string, Additional information to return.
573    Allowed values
574      ANALYTICS_CLICKS - Returns short URL click counts.
575      FULL - Returns short URL click counts.
576
577Returns:
578  An object of the form:
579
580    {
581    "nextPageToken": "A String", # A token to provide to get the next page of results.
582    "items": [ # A list of URL resources.
583      {
584          "status": "A String", # Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
585          "kind": "urlshortener#url", # The fixed string "urlshortener#url".
586          "created": "A String", # Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
587          "analytics": { # A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
588            "week": { # Click analytics over the last week.
589              "shortUrlClicks": "A String", # Number of clicks on this short URL.
590              "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
591                {
592                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
593                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
594                },
595              ],
596              "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
597                {
598                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
599                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
600                },
601              ],
602              "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
603                {
604                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
605                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
606                },
607              ],
608              "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
609                {
610                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
611                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
612                },
613              ],
614              "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
615            },
616            "allTime": { # Click analytics over all time.
617              "shortUrlClicks": "A String", # Number of clicks on this short URL.
618              "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
619                {
620                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
621                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
622                },
623              ],
624              "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
625                {
626                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
627                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
628                },
629              ],
630              "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
631                {
632                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
633                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
634                },
635              ],
636              "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
637                {
638                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
639                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
640                },
641              ],
642              "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
643            },
644            "twoHours": { # Click analytics over the last two hours.
645              "shortUrlClicks": "A String", # Number of clicks on this short URL.
646              "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
647                {
648                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
649                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
650                },
651              ],
652              "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
653                {
654                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
655                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
656                },
657              ],
658              "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
659                {
660                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
661                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
662                },
663              ],
664              "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
665                {
666                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
667                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
668                },
669              ],
670              "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
671            },
672            "day": { # Click analytics over the last day.
673              "shortUrlClicks": "A String", # Number of clicks on this short URL.
674              "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
675                {
676                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
677                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
678                },
679              ],
680              "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
681                {
682                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
683                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
684                },
685              ],
686              "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
687                {
688                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
689                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
690                },
691              ],
692              "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
693                {
694                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
695                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
696                },
697              ],
698              "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
699            },
700            "month": { # Click analytics over the last month.
701              "shortUrlClicks": "A String", # Number of clicks on this short URL.
702              "countries": [ # Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
703                {
704                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
705                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
706                },
707              ],
708              "platforms": [ # Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
709                {
710                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
711                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
712                },
713              ],
714              "browsers": [ # Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
715                {
716                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
717                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
718                },
719              ],
720              "referrers": [ # Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
721                {
722                  "count": "A String", # Number of clicks for this top entry, e.g. for this particular country or browser.
723                  "id": "A String", # Label assigned to this top entry, e.g. "US" or "Chrome".
724                },
725              ],
726              "longUrlClicks": "A String", # Number of clicks on all goo.gl short URLs pointing to this long URL.
727            },
728          },
729          "longUrl": "A String", # Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
730          "id": "A String", # Short URL, e.g. "http://goo.gl/l6MS".
731        },
732    ],
733    "kind": "urlshortener#urlHistory", # The fixed string "urlshortener#urlHistory".
734    "itemsPerPage": 42, # Number of items returned with each full "page" of results. Note that the last page could have fewer items than the "itemsPerPage" value.
735    "totalItems": 42, # Total number of short URLs associated with this user (may be approximate).
736  }</pre>
737</div>
738
739</body></html>