Blogger JSON API Guide: How to Use v3 After v2.0 Shutdown

Learn how to use the Blogger JSON API with OAuth 2.0 and API keys. Step-by-step guide to retrieve blogs, posts, pages, and comments

Quick summary — v2 was deprecated; use v3

Important: Google announced the discontinuation of the Blogger JSON API v2 (the older v2/GData JSON endpoint). If your app still uses v2, you must migrate to the supported v3 endpoints to avoid service interruption.

What you'll learn in this guide

This article explains how to call the Blogger JSON API v3, the differences from v2 you must care about, how authorization works (API key vs OAuth 2.0), the standard/global query parameters that apply to every request, resource-specific parameters (posts, pages, comments), real code examples (curl, Node/JS, Python), and a migration checklist.

Blogger API v3 — base URL, resources and common REST patterns

The v3 API uses standard RESTful endpoints. The usual base is https://www.googleapis.com/blogger/v3/ (sometimes shown as https://blogger.googleapis.com/v3/ in examples). Core resources are: blogs, posts, pages, comments and users. Typical endpoints look like:

GET https://www.googleapis.com/blogger/v3/blogs/{blogId}
GET https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts
GET https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}
GET https://www.googleapis.com/blogger/v3/blogs/{blogId}/pages
GET https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/{postId}/comments

These endpoints (and their parameters) are documented in the official v3 reference and Getting Started docs.

Authorization: API key vs OAuth 2.0 (when to use each)

API Key — good for accessing public data (public blogs, public posts). You obtain a key in Google Cloud Console and add it as a query parameter like ?key=YOUR_API_KEY. Use API keys for simple read-only public queries and quota tracking.

OAuth 2.0 (Bearer tokens) — required when you access or modify private user data (create posts, edit/delete, access private blogs). OAuth also identifies the user and grants scoped permissions (the main scope for Blogger is https://www.googleapis.com/auth/blogger for write/manage operations). Use OAuth for write operations and for reading private

Related Posts

Quick steps: get an API key or OAuth credentials

  1. Create a Google Cloud project (console.cloud.google.com) and enable the Blogger API.
  2. For read-only public access: create an API key under Credentials → Create credentials → API key.
  3. For write/private access: configure OAuth consent, create OAuth 2.0 Client ID (web or other), then implement the OAuth flow to obtain an access token.
  4. Test calls with the API Explorer (or curl/Postman) and include ?key= for API-key calls or header Authorization: Bearer <ACCESS_TOKEN> for OAuth calls.

Global / standard query parameters (system parameters every request can accept)

Google REST APIs expose a set of system parameters that apply across many services. These include:

Most useful global/system parameters

  • key — API key for identifying your project (required for unauthenticated public requests unless OAuth used). Example: ?key=YOUR_API_KEY.
  • oauth_token / Authorization: Bearer <token> — OAuth 2.0 access token for requests that require authorization.
  • fields — partial response field selector to reduce payload (e.g. ?fields=items(title,id)).
  • alt — response format (default is JSON; e.g. alt=json).
  • callback — for JSONP (browser-side callback) when supported (used in legacy JS examples).
  • prettyPrint — boolean, returns human-readable JSON when true (not recommended for production requests).
  • quotaUser — opaque string for quota/ per-user quota handling on server apps.

These system parameters and their exact names and behaviours are defined in Google's Discovery/System Parameters docs — use them to control output, quota, and authentication.

Resource-specific query parameters (examples)

In addition to the global/system parameters above, each resource method may accept resource-specific parameters (for posts, pages, comments, etc.). Below are the common ones you will use frequently.

Posts (GET list) — useful parameters

  • maxResults — maximum number of items returned (pagination control).
  • pageToken — token for retrieving the next page of results.
  • labels — comma-separated label filter (only posts with these labels).
  • startDate / endDate — RFC 3339 date-time to filter posts by published date.
  • fetchBodies — boolean; if false the post bodies are omitted (useful to reduce payload when you only need titles or metadata).
  • view — controls which view is used (READER, AUTHOR, ADMIN) for visibility-sensitive fields.

The posts:list method and its parameter list are documented in the v3 reference. Use fetchBodies=false when you only need metadata to save bandwidth.

Examples — real requests & sample code

1) Simple public GET (API key)

Fetch blog metadata (public blog) — replace {BLOG_ID} and {API_KEY}:

curl -s "https://www.googleapis.com/blogger/v3/blogs/{BLOG_ID}?key={API_KEY}" \
  -H "Accept: application/json"

2) List posts with optional parameters (API key)

Example: list up to 10 posts, fetch only metadata (no bodies):

curl -s "https://www.googleapis.com/blogger/v3/blogs/{BLOG_ID}/posts?maxResults=10&fetchBodies=false&key={API_KEY}"

3) Authorized request (create a post) — OAuth Bearer token

Creating or modifying content requires an OAuth 2.0 token with appropriate scope. Example (POST creates a new post):

curl -s -X POST "https://www.googleapis.com/blogger/v3/blogs/{BLOG_ID}/posts/" \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "blogger#post",
    "title": "My API-created post",
    "content": "Hello from the API!"
  }'

The OAuth flow (obtain authorization code → exchange for access token → use token) must be implemented in your app. Use the https://www.googleapis.com/auth/blogger scope for full blog access. :contentReference[oaicite:7]{index=7}

4) Browser JSONP (legacy) — callback + key

When calling the API from plain client-side JavaScript you can use the callback parameter (note: OAuth from browser requires extra security steps):

<script src="https://www.googleapis.com/blogger/v3/blogs/3213900/posts/8398240586497962757?callback=handleResponse&key=YOUR_API_KEY"></script>

Then implement a global function handleResponse(response) to consume the result. Use CORS/modern OAuth+fetch for production SPAs instead.

Migration checklist — moving from v2 to v3

  1. Update endpoint URLs — replace https://www.googleapis.com/blogger/v2/... with https://www.googleapis.com/blogger/v3/... (and adjust resource path if necessary).
  2. Review parameters — some v2 parameters changed or were removed; consult v3's reference for each method and update query names/semantics.
  3. Switch to OAuth 2.0 where required — ensure your app uses OAuth 2.0 for private data; check scopes and consent screen settings.
  4. Use partial responses — adopt fields to reduce response sizes where appropriate.
  5. Test thoroughly — confirm list/pagination (pageToken), ordering, and body fields match your app's needs.

Google explicitly scheduled the v2 JSON API shutdown and recommends migrating to v3. Follow the migration checklist above to avoid sudden breakage.

Best practices & tips

  • Always include an API key for public calls — it helps quota and monitoring, even if the call is public-only. :contentReference[oaicite:10]{index=10}
  • Use fields to request only what you need — smaller responses = faster responses and lower bandwidth.
  • Use fetchBodies=false for listing large numbers of posts when you only need metadata (titles, urls).
  • Implement robust error handling — watch for 401/403 (auth), 404 (resource not found), 400 (bad params), and quota errors.
  • Respect quota and caching — cache results where possible, avoid polling, and use exponential backoff on retryable errors.

Troubleshooting — common errors & fixes

403 / PERMISSION_DENIED

Usually indicates missing OAuth token or insufficient scope for private resources. For write or private reads, use a valid OAuth 2.0 access token and the proper scope. For public calls, ensure you're supplying an API key if you removed the Authorization header.

Missing content in posts list

If your posts:list is missing bodies, check whether fetchBodies was defaulted to false. Add &fetchBodies=true if you need the full post content. :contentReference[oaicite:13]{index=13}

Pagination issues (only X items returned)

Use pageToken and the nextPageToken value returned in responses to iterate result sets. Use maxResults to tune page size.

Quick reference (cheat sheet)

Action Endpoint (example) Auth
Get blog by ID GET https://www.googleapis.com/blogger/v3/blogs/{blogId}?key=API_KEY API key (public) or OAuth (private)
List posts GET https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts?maxResults=10&fetchBodies=false API key (public) or OAuth (private)
Create post POST https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts/ OAuth 2.0 (Bearer token)

Official docs & further reading

  1. Getting started + usage (Blogger API v3): official docs.
  2. v3 API reference — Blogs / Posts / Pages / Comments methods.
  3. v2 deprecation & migration notice.
  4. Google system (discovery) parameters reference (globally applicable query parameters). :contentReference[oaicite:18]{index=18}

Conclusion

If your app still uses Blogger JSON API v2, migrate to v3 ASAP: update endpoints, re-check the parameter names, and move to OAuth 2.0 for private actions. Use the global query parameters (key, fields, oauth_token etc.) to control authentication, payload size and quota. Test all methods after migration and use partial responses (fields) and fetchBodies=false where appropriate to keep responses small and fast.

FAQ (brief)

Q: Does v3 still accept ?key=?

A: Yes — API key as ?key=YOUR_API_KEY is supported for public-data requests. Use OAuth for private data. :contentReference[oaicite:20]{index=20}

Q: Where to find the list of global/system params?

A: See Google APIs Discovery / System Parameters docs for the canonical list.

Q: My app used a v2-only query — will it break?

A: Possibly — confirm the param exists in v3 or find the v3 replacement. If the v2 param was removed, modify your code to use v3's supported params. Check the v3 reference for each method.

About the author

Leo
Hey! I'm Leo. I'm always eager to learn new things and enjoy sharing my knowledge with others.

Post a Comment

To avoid SPAM, all comments will be moderated before being displayed.
Don't share any personal or sensitive information.