Google Slides API

Development / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

The Google Slides API allows you to create, read, and modify Google Slides presentations programmatically, including managing slides, text boxes, images, shapes, and speaker notes. It is commonly used for auto-generating pitch decks, reports, or training materials from data sources. Like other Google Workspace APIs, it requires OAuth 2.0 and all structural edits are done via a batchUpdate request with typed request objects.

💡

Beginner Tip

Google Slides has a steep learning curve because all edits go through the batchUpdate endpoint using typed request objects — there is no simple setTitle or addSlide shortcut. Start by calling presentations.get to understand the JSON structure of an existing presentation before attempting writes. Use placeholder IDs carefully, as every element on a slide has a unique object ID that you must reference correctly.

Available Data

Google Slides data via REST API
JSON-formatted response data
Requires OAuth authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Google Slides",
    "description": "API to read, write, and format Google Slides presentations",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

presentationId Unique identifier of the Google Slides presentation.
slides Ordered array of slide objects comprising the entire presentation.
slides[].objectId Unique identifier for the slide, required when referencing it in update operations.
slides[].pageElements Array of elements on the slide such as text boxes, images, and shapes.
title The title of the presentation as shown in Google Drive.
layouts Array of layout templates used by slides in the presentation.

Implementation Example

const url = "https://developers.google.com/slides/api/reference/rest";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 Invalid requests: objectId not found A batchUpdate request references a slide or element object ID that does not exist in the presentation.
Call presentations.get first to retrieve all valid object IDs, then use those exact IDs in your update requests.
403 Forbidden The OAuth token lacks the presentations scope or the presentation has not been shared.
Include the https://www.googleapis.com/auth/presentations scope in your OAuth flow and share the presentation with your service account if applicable.
Conflicting operations in batchUpdate Two operations in the same batch request modify the same element in incompatible ways.
Split conflicting operations into separate batchUpdate calls executed sequentially.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Development
Difficulty Advanced
Verified: 2026-04-07

Similar APIs

View All →