---
title: "Romanize the Chinese name to Pinyin, ex. 王晓明 -> Wang (surname) Xiaoming (given name)"
method: GET
path: "/api2/json/pinyinChineseName/{chineseName}"
tags: ["chinese"]
---

# Romanize the Chinese name to Pinyin, ex. 王晓明 -> Wang (surname) Xiaoming (given name)

`GET /api2/json/pinyinChineseName/{chineseName}`

## Request

- Base URL: `https://v2.namsor.com/NamSorAPIv2`
- URL: `https://v2.namsor.com/NamSorAPIv2/api2/json/pinyinChineseName/{chineseName}`
- Auth: API key in header `X-API-KEY`

## Path parameters

- `chineseName` string, required

## Response `200`

A pinyin name.

- PersonalNameParsedOut
  - `script` string
  - `id` string
  - `explanation` string
  - `name` string: The input name.
  - `nameParserType` 'FN1LN1' | 'LN1FN1' | 'FN1LN2' | 'LN2FN1' | 'FN1LNx' | 'LNxFN1' | 'FN2LN1' | 'LN1FN2' | 'FN2LN2' | 'LN2FN2' | 'FN2LNx' | 'LNxFN2' | 'FNxLN1' | 'LN1FNx' | 'FNxLN2' | 'LN2FNx' | 'FNxLNx' | 'LNxFNx': Name parsing is addressed as a classification problem, for example FN1LN1 means a first then last name order.
  - `nameParserTypeAlt` 'FN1LN1' | 'LN1FN1' | 'FN1LN2' | 'LN2FN1' | 'FN1LNx' | 'LNxFN1' | 'FN2LN1' | 'LN1FN2' | 'FN2LN2' | 'LN2FN2' | 'FN2LNx' | 'LNxFN2' | 'FNxLN1' | 'LN1FNx' | 'FNxLN2' | 'LN2FNx' | 'FNxLNx' | 'LNxFNx': Second best alternative parsing. Name parsing is addressed as a classification problem, for example FN1LN1 means a first then last name order.
  - `firstLastName` FirstLastNameOut: First / last name structure corresponding to the most likely parsing.
    - `script` string
    - `id` string
    - `explanation` string
    - `firstName` string: The first name (also known as given name)
    - `lastName` string: The last name (also known as family name, or surname)
  - `score` number, double: Higher score is better, but score is not normalized. Use calibratedProbability if available.

## Other responses

- `401`: Missing or incorrect API Key
- `403`: Email not Verified, or API Limit Reached, or API Key Disabled
- `429`: Too Many Requests

## Changes

- **2025-05-16** `6297d39b756d`: 3 info
  - added the non-success response with the status `429`
  - added the optional property `explanation` to the response with the `200` status
  - added the optional property `firstLastName/explanation` to the response with the `200` status
- **2022-08-19** `c084be2dba5a`: 36 warning
  - added the new `FN1LN1` enum value to the `nameParserType` response property for the response status `200`
  - added the new `FN1LN1` enum value to the `nameParserTypeAlt` response property for the response status `200`
  - added the new `FN1LN2` enum value to the `nameParserType` response property for the response status `200`
  - added the new `FN1LN2` enum value to the `nameParserTypeAlt` response property for the response status `200`
  - …32 more

[Operation history](https://skmtc.dev/namsor/apis/namsor-api-v2/changes/api2/json/pinyinChineseName/:chineseName/get.md)

---

[API](https://skmtc.dev/namsor/apis/namsor-api-v2.md) - [All operations](https://skmtc.dev/namsor/apis/namsor-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/namsor/apis/namsor-api-v2/revisions/305e4f6eeaf5?raw)
