# General Translation Platform: getProjectData URL: https://generaltranslation.com/en-US/docs/platform/core/reference/gt-class-methods/translation/get-project-data.mdx --- title: getProjectData description: Read Project-level metadata and translation configuration. API reference for getProjectData. --- Retrieves information about a translation Project with General Translation, including its name, Organization, default locale, and currently configured target locales. Use it to inspect or validate Project configuration. ## Overview [#overview] Call `getProjectData` with a Project ID. It returns read-only Project metadata and locale configuration. ```typescript const gt = new GT({ projectId: 'your-project-id', apiKey: 'your-api-key' }); const projectData = await gt.getProjectData('project-123'); console.log(`Project: ${projectData.name}`); console.log(`Default locale: ${projectData.defaultLocale}`); console.log(`Target locales: ${projectData.currentLocales.join(', ')}`); ``` Signature: ```typescript getProjectData( projectId: string, options?: { timeout?: number } ): Promise ``` *Note: `getProjectData` requires an `apiKey` (or `devApiKey`) and `projectId` on the GT instance, and the Project must be accessible with that API key.* ## How it works [#how-it-works] - **Read-only.** The method provides read-only access to Project information — use the Dashboard to modify Project settings. - **Locale configuration.** The response includes both source (`defaultLocale`) and target (`currentLocales`) locale configuration. - **Validation.** Use it to validate Project configuration before starting translation workflows. ## Parameters [#parameters] | Parameter | Description | Type | Optional | Default | | --- | --- | --- | --- | --- | | [`projectId`](#project-id) | The unique identifier of the Project to retrieve. | `string` | No | — | | [`options`](#options) | Configuration for the request. | `{ timeout?: number }` | Yes | — | ### `projectId` [#project-id] **Type** `string` · **Required** The unique identifier of the Project to retrieve. The Project must be accessible with the provided API key. ### `options` [#options] **Type** `{ timeout?: number }` · **Optional** | Field | Description | Type | Optional | | --- | --- | --- | --- | | `timeout` | Request timeout in milliseconds. | `number` | Yes | ## Returns [#returns] **Type** `Promise` Resolves to a `ProjectData` object describing the Project: ```typescript type ProjectData = { id: string; name: string; orgId: string; defaultLocale: string; currentLocales: string[]; }; ``` | Property | Description | Type | | --- | --- | --- | | `id` | Unique Project identifier. | `string` | | `name` | Human-readable Project name. | `string` | | `orgId` | Organization identifier that owns the Project. | `string` | | `defaultLocale` | Default source locale for the Project. | `string` | | `currentLocales` | Target locales currently configured. | `string[]` | ## Examples [#examples] ```typescript title="index.ts" import { GT } from 'generaltranslation'; const gt = new GT({ projectId: 'your-project-id', apiKey: 'your-api-key', }); async function getProjectInfo(projectId: string) { try { const project = await gt.getProjectData(projectId); console.log('=== Project Information ==='); console.log(`ID: ${project.id}`); console.log(`Name: ${project.name}`); console.log(`Organization: ${project.orgId}`); console.log(`Default Locale: ${project.defaultLocale}`); console.log(`Target Locales: ${project.currentLocales.join(', ')}`); return project; } catch (error) { console.error(`Failed to retrieve project ${projectId}:`, error); throw error; } } const projectInfo = await getProjectInfo('my-project-123'); ``` ## Notes [#notes] - The method provides read-only access to Project information — use the Dashboard to modify Project settings. - This method requires a valid Project ID; the Project must be accessible with the provided API key. - Project data includes both source and target locale configurations. - The `currentLocales` array represents all target locales configured for the Project. - Use this method to validate Project configuration before starting translation workflows.