---
search:
  tags:
    - Localization
    - POST
seo:
  description: >-
    Extracts translatable strings from a source or resource file. The file type…
    Reference for the POST /v1/localization/extract endpoint in the Webfold API.
sidebar:
  label: List the translatable strings in a file
  badge: POST
title: List the translatable strings in a file
type: openapi-operation
---
Extracts translatable strings from a source or resource file. The file type comes from the `filename` extension (JSX/TSX, Vue, Svelte, HTML, Markdown, JSON, PO, YAML, XLIFF, Android XML, iOS strings, ARB, properties, CSV). Metered as `localization.extract`.

`POST /v1/localization/extract`

**Request body** (`application/json`, required)

- `filename` (string, required)
- `content` (string, required) — Up to 1 MiB.

Request body example:

```json
{
  "filename": "locales/en.json",
  "content": "string"
}
```

**Responses**

- `200` — Extracted strings
- `400` — Bad request
- `401` — Missing or invalid bearer token
- `403` — Billing or plan entitlement blocked the request

Response example, 200:

```json
{
  "filename": "string",
  "count": 0,
  "units": [
    {
      "key": "string",
      "text": "string",
      "context": "string"
    }
  ]
}
```
