AI-generated Key Takeaways
- 
          Adds an enrichment (text, location, or map) to a specified position within a Google Photos album. 
- 
          Requires providing the album ID, enrichment type, and desired position within the album. 
- 
          Uses a POST request to https://photoslibrary.googleapis.com/v1/albums/{albumId}:addEnrichment.
- 
          Requires authorization with specific OAuth scopes, such as https://www.googleapis.com/auth/photoslibrary.
- 
          Starting March 31, 2025, the API will only work with media items created by your application. 
- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- NewEnrichmentItem
- TextEnrichment
- LocationEnrichment
- Location
- LatLng
- MapEnrichment
- EnrichmentItem
- Try it!
Adds an enrichment at a specified position in an app created created album.
HTTP request
POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:addEnrichment
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| albumId | 
 Required. Identifier of the app created album where the enrichment is to be added. | 
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
| { "newEnrichmentItem": { object ( | 
| Fields | |
|---|---|
| newEnrichmentItem | 
 Required. The enrichment to be added. | 
| albumPosition | 
 Required. The position in the app created album where the enrichment is to be inserted. | 
Response body
The enrichment item that's created.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| {
  "enrichmentItem": {
    object ( | 
| Fields | |
|---|---|
| enrichmentItem | 
 Output only. Enrichment which was added. | 
Authorization scopes
Requires one of the following OAuth scopes:
- https://www.googleapis.com/auth/photoslibrary.appendonly
- https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata
NewEnrichmentItem
A new enrichment item to be added to an app created album, used by the albums.addEnrichment call.
| JSON representation | 
|---|
| { // Union field | 
| Fields | |
|---|---|
| Union field enrichment. Enrichment to be added to the app created album. This could be either a text, location, or a map.enrichmentcan be only one of the following: | |
| textEnrichment | 
 Text to be added to the app created album. | 
| locationEnrichment | 
 Location to be added to the app created album. | 
| mapEnrichment | 
 Map to be added to the app created album. | 
TextEnrichment
An enrichment containing text.
| JSON representation | 
|---|
| { "text": string } | 
| Fields | |
|---|---|
| text | 
 Text for this enrichment item. | 
LocationEnrichment
An enrichment containing a single location.
| JSON representation | 
|---|
| {
  "location": {
    object ( | 
| Fields | |
|---|---|
| location | 
 Location for this enrichment item. | 
Location
Represents a physical location.
| JSON representation | 
|---|
| {
  "locationName": string,
  "latlng": {
    object ( | 
| Fields | |
|---|---|
| locationName | 
 Name of the location to be displayed. | 
| latlng | 
 Position of the location on the map. | 
LatLng
An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
| JSON representation | 
|---|
| { "latitude": number, "longitude": number } | 
| Fields | |
|---|---|
| latitude | 
 The latitude in degrees. It must be in the range [-90.0, +90.0]. | 
| longitude | 
 The longitude in degrees. It must be in the range [-180.0, +180.0]. | 
MapEnrichment
An enrichment containing a map, showing origin and destination locations.
| JSON representation | 
|---|
| { "origin": { object ( | 
| Fields | |
|---|---|
| origin | 
 Origin location for this enrichment item. | 
| destination | 
 Destination location for this enrichemt item. | 
EnrichmentItem
An enrichment item.
| JSON representation | 
|---|
| { "id": string } | 
| Fields | |
|---|---|
| id | 
 Identifier of the enrichment item. | 
