필수입니다. 사진 미디어의 리소스 이름으로, places/{placeId}/photos/{photo_reference}/media 형식입니다.
장소 객체의 photos.name 필드에 반환된 사진의 리소스 이름은 places/{placeId}/photos/{photo_reference} 형식입니다. 사진 미디어 리소스 이름을 가져오려면 사진 리소스 끝에 /media를 추가해야 합니다.
쿼리 매개변수
매개변수
maxWidthPx
integer
선택사항입니다. 원하는 최대 이미지 너비(단위: 픽셀)를 지정합니다. 이미지가 지정된 값보다 작은 경우 원본 이미지가 반환됩니다. 이미지의 한 측정기준이 더 큰 경우 두 측정기준 중 더 작은 값에 맞게 크기가 조정되며 원래 가로세로 비율로 제한됩니다. maxHeightPx 및 maxWidthPx 속성은 모두 1과 4800 사이의 정수를 허용합니다(양 끝값 포함). 값이 허용된 범위에 해당하지 않으면 INVALID_ARGUMENT 오류가 반환됩니다.
maxHeightPx 또는 maxWidthPx 중 하나 이상을 지정해야 합니다. maxHeightPx 또는 maxWidthPx가 지정되지 않으면 INVALID_ARGUMENT 오류가 반환됩니다.
maxHeightPx
integer
선택사항입니다. 원하는 최대 이미지 높이(픽셀)를 지정합니다. 이미지가 지정된 값보다 작은 경우 원본 이미지가 반환됩니다. 이미지의 한 측정기준이 더 큰 경우 두 측정기준 중 더 작은 값에 맞게 크기가 조정되며 원래 가로세로 비율로 제한됩니다. maxHeightPx 및 maxWidthPx 속성은 모두 1과 4800 사이의 정수를 허용합니다(양 끝값 포함). 값이 허용된 범위에 해당하지 않으면 INVALID_ARGUMENT 오류가 반환됩니다.
maxHeightPx 또는 maxWidthPx 중 하나 이상을 지정해야 합니다. maxHeightPx 또는 maxWidthPx가 지정되지 않으면 INVALID_ARGUMENT 오류가 반환됩니다.
skipHttpRedirect
boolean
선택사항입니다. 이 속성을 설정하면 기본 HTTP 리디렉션 동작을 건너뛰고 텍스트 형식 (예: HTTP 사용 사례의 경우 JSON 형식) 응답을 렌더링합니다. 설정하지 않으면 HTTP 리디렉션이 실행되어 호출을 이미지 미디어로 리디렉션합니다. HTTP가 아닌 요청의 경우 이 옵션은 무시됩니다.
요청 본문
요청 본문은 비어 있어야 합니다.
응답 본문
Places API의 사진 미디어입니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현
{"name": string,"photoUri": string}
필드
name
string
사진 미디어의 리소스 이름으로, places/{placeId}/photos/{photo_reference}/media 형식입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eRetrieve a photo media resource using a specific photo reference string through a GET request.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003ename\u003c/code\u003e path parameter specifying the photo media resource, formatted as \u003ccode\u003eplaces/{placeId}/photos/{photo_reference}/media\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eOptionally customize the retrieved photo's dimensions using \u003ccode\u003emaxWidthPx\u003c/code\u003e and \u003ccode\u003emaxHeightPx\u003c/code\u003e query parameters, with values ranging from 1 to 4800.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides a JSON object containing the photo media's resource name (\u003ccode\u003ename\u003c/code\u003e) and a temporary URI (\u003ccode\u003ephotoUri\u003c/code\u003e) for rendering the photo.\u003c/p\u003e\n"]]],["This outlines how to retrieve photo media using a `GET` request to the specified URL, which requires a photo resource `name` in the path parameters. Optional query parameters `maxWidthPx` and `maxHeightPx` allow for image resizing (1-4800 pixels). `skipHttpRedirect` is another optional parameter. The request body must be empty. The response includes `name` and a short-lived `photoUri` for the photo. Access requires the `cloud-platform` authorization scope.\n"],null,["# Method: places.photos.getMedia\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.PhotoMedia.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nGet a photo media with a photo reference string.\n\n### HTTP request\n\n`GET https://places.googleapis.com/v1/{name=places/*/photos/*/media}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name of a photo media in the format: `places/{placeId}/photos/{photo_reference}/media`. The resource name of a photo as returned in a Place object's `photos.name` field comes with the format `places/{placeId}/photos/{photo_reference}`. You need to append `/media` at the end of the photo resource to get the photo media resource name. |\n\n### Query parameters\n\n| Parameters ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `maxWidthPx` | `integer` Optional. Specifies the maximum desired width, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the maxHeightPx and maxWidthPx properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned. At least one of maxHeightPx or maxWidthPx needs to be specified. If neither maxHeightPx nor maxWidthPx is specified, an INVALID_ARGUMENT error will be returned. |\n| `maxHeightPx` | `integer` Optional. Specifies the maximum desired height, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the maxHeightPx and maxWidthPx properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned. At least one of maxHeightPx or maxWidthPx needs to be specified. If neither maxHeightPx nor maxWidthPx is specified, an INVALID_ARGUMENT error will be returned. |\n| `skipHttpRedirect` | `boolean` Optional. If set, skip the default HTTP redirect behavior and render a text format (for example, in JSON format for HTTP use case) response. If not set, an HTTP redirect will be issued to redirect the call to the image media. This option is ignored for non-HTTP requests. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nA photo media from Places API.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------|\n| ``` { \"name\": string, \"photoUri\": string } ``` |\n\n| Fields ||\n|------------|---------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The resource name of a photo media in the format: `places/{placeId}/photos/{photo_reference}/media`. |\n| `photoUri` | `string` A short-lived uri that can be used to render the photo. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`"]]