Quantcast
Channel: Obtain a Blogger's blog ID from its friendly URL without screen scraping - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by Ifan Iqbal for Obtain a Blogger's blog ID from its friendly URL without screen scraping

$
0
0

Today, the newest blogger API is in version 3.0. With that new API, we can get blog ID with resource type getByUrl. This is full example using my blog and my API:

https://www.googleapis.com/blogger/v3/blogs/byurl?url=http%3A%2F%2Fwww.ifaniqbal.com&key=AIzaSyDNkR52eSfObZi9BPKrTytbowOAM7Js9uY

Just Ctrl+C that example and Ctrl+V to your browser to test that. One of return field of that example is 'id' field, which is the blog ID that we want (in JSON), like this:

{"kind": "blogger#blog","id": "7107469463017369923","name": "Ifan Iqbal","description": "Tips, Download, Resensi, Tutorial, Blog, Blogspot","published": "2012-02-28T23:54:48+07:00","updated": "2013-07-11T16:24:58+07:00","url": "http://www.ifaniqbal.com/","selfLink": "https://www.googleapis.com/blogger/v3/blogs/7107469463017369923","posts": {"totalItems": 161,"selfLink": "https://www.googleapis.com/blogger/v3/blogs/7107469463017369923/posts"},"pages": {"totalItems": 2,"selfLink": "https://www.googleapis.com/blogger/v3/blogs/7107469463017369923/pages"},"locale": {"language": "in","country": "","variant": ""}

}


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>