Google Docs API 개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google Docs API를 사용하면 Google Docs에서 문서를 만들고 수정할 수 있습니다.
애플리케이션은 Docs API와 통합하여 사용자 제공 데이터와 시스템 제공 데이터를 모두 사용하여 세련된 문서를 만들 수 있습니다. Docs API를 사용하면 다음 작업을 할 수 있습니다.
- 프로세스 자동화
- 문서 일괄 생성
- 문서 서식 지정
- 인보이스 또는 계약서 생성
- 객체의 특정 속성 검색
다음은 Docs API에서 사용되는 일반적인 용어 목록입니다.
- 문서 ID
문서의 고유 식별자입니다. 문서를 참조하는 문자, 숫자, 일부 특수문자가 포함된 특정 문자열로, 문서의 URL에서 파생될 수 있습니다. 문서 이름이 변경되더라도 문서 ID는 안정적입니다. ID를 찾는 방법에 관한 자세한 내용은 문서 ID를 참고하세요.
https://docs.google.com/document/d/DOCUMENT_ID/edit
- 요소
문서를 구성하는 구조입니다. 문서의 최상위 요소에는 Body
, DocumentStyle
, List
가 포함됩니다.
- Google Workspace 문서
Google Docs와 같은 Google Workspace 애플리케이션에서 만드는 파일입니다.
Docs의 MIME 유형 형식은 application/vnd.google-apps.document
입니다. MIME 유형 목록은
Google Workspace 및 Google Drive에서 지원되는 MIME 유형을 참고하세요.
- 색인
콘텐츠 본문 내의 대부분의 요소에는 startIndex
및 endIndex
속성이 있습니다. 이는 요소의 시작과 끝을 래핑하는 세그먼트의 시작을 기준으로 한 오프셋을 나타냅니다.
- 인라인 이미지
문서 내 텍스트 흐름에 표시되는 이미지입니다. 첨부파일이 아닙니다.
- 이름이 지정된 범위
연속된 텍스트 범위 NamedRange
는 동일한 namedRangeId
를 가진 범위 모음입니다. 이름이 지정된 범위를 사용하면 개발자가 문서의 일부를 임의의 사용자 정의 라벨과 연결하여 나중에 콘텐츠를 프로그래매틱 방식으로 읽거나 수정할 수 있습니다. 문서에 이름이 같은 여러 이름 지정 범위가 포함될 수 있지만 모든 이름 지정 범위에는 고유한 ID가 있습니다.
- Segment
구조적 또는 콘텐츠 요소가 포함된 Body
, Header
, Footer
또는 Footnote
세그먼트 내 요소의 색인은 해당 세그먼트의 시작 부분을 기준으로 합니다.
- 추천
원본 텍스트를 변경하지 않고 문서를 변경합니다. 소유자가 제안을 적용하면 원래의 텍스트가 대체됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-01(UTC)
[null,null,["최종 업데이트: 2025-08-01(UTC)"],[],[],null,["# Google Docs API overview\n\nThe Google Docs API lets you create and modify documents in Google Docs.\n\nApplications can integrate with the Docs API to create polished\ndocuments from both user and system-provided data. The Docs API lets\nyou:\n\n- Automate processes\n- Create documentation in bulk\n- Format documents\n- Generate invoices or contracts\n- Retrieve specific attributes of objects\n\nThe following is a list of common terms used in the Docs API:\n\n*Document ID*\n\n: The unique identifier for a document. It's a particular string containing\n letters, numbers, and some special characters that reference a document and\n it can be derived from the document's URL. Document IDs are stable, even if\n the document name changes. For more information on how to find the ID, see\n [Document ID](/workspace/docs/api/concepts/document#document-id).\n\n https://docs.google.com/document/d/\u003cvar translate=\"no\"\u003eDOCUMENT_ID\u003c/var\u003e/edit\n\n*Element*\n\n: The structure that makes up a document. Top-level elements of a document\n include the [`Body`](/workspace/docs/api/reference/rest/v1/documents#body),\n [`DocumentStyle`](/workspace/docs/api/reference/rest/v1/documents#documentstyle), and\n [`List`](/workspace/docs/api/reference/rest/v1/documents#list).\n\n*Google Workspace document*\n\n: A file that a Google Workspace application, like Google Docs, creates.\n The MIME type format for Docs is\n `application/vnd.google-apps.document`. For a list of MIME types, see [Google Workspace and Google Drive supported MIME types](/drive/api/guides/mime-types).\n\n*Index*\n\n: Most *elements* within the content body have the `startIndex` and `endIndex`\n properties. These indicate the offset of an element's beginning and end,\n relative to the beginning of its enclosing *segment*.\n\n*Inline image*\n\n: An image that appears in the flow of text within a document. It's not an\n attachment.\n\n*Named range*\n\n: A contiguous range of text. A\n [`NamedRange`](/workspace/docs/api/reference/rest/v1/documents#namedrange) is a\n collection of ranges with the same `namedRangeId`. Named ranges allow\n developers to associate parts of a document with an arbitrary user-defined\n label so their contents can be programmatically read or edited later. A\n document can contain multiple named ranges with the same name, but every\n named range has a unique ID.\n\n*Segment*\n\n: The `Body`, [`Header`](/workspace/docs/api/reference/rest/v1/documents#header),\n [`Footer`](/workspace/docs/api/reference/rest/v1/documents#footer), or\n [`Footnote`](/workspace/docs/api/reference/rest/v1/documents#footnote) containing\n structural or content *elements* . The *indexes* of the elements within a\n segment are relative to the beginning of that segment.\n\n*Suggestion*\n\n: Changes to a document without changing the original text. If the owner\n approves your suggestions, they replace the original text.\n\nRelated topics\n--------------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, refer to [Develop on\n Google Workspace](/workspace/guides/get-started).\n\n- To get a conceptual overview of a document, see\n [Document](/workspace/docs/api/concepts/document).\n\n- To learn how to configure and run a Docs API app, try the\n [JavaScript quickstart](/workspace/docs/api/quickstart/js)."]]