# General Translation Platform: getProjectData
URL: https://generaltranslation.com/en-US/docs/platform/core/reference/gt-class-methods/translation/get-project-data.mdx
Docs index: https://generaltranslation.com/llms.txt
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<ProjectData>
```

*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<ProjectData>`

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.

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
