---
title: "Infer the likely first/last name structure of a name, ex. 王晓明 -> 王(surname) 晓明(given name)."
method: POST
path: "/api2/json/parseChineseNameBatch"
tags: ["chinese"]
---

# Infer the likely first/last name structure of a name, ex. 王晓明 -> 王(surname) 晓明(given name).

`POST /api2/json/parseChineseNameBatch`

## Request body

- BatchPersonalNameIn
  - `personalNames` PersonalNameIn[]
    - `id` string
    - `name` string

## Response `200`

A list of parsed names.

- BatchPersonalNameParsedOut
  - `personalNames` PersonalNameParsedOut[] — Classified parsed names
    - `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

- `400` — Bad request (ex. too many names)
- `401` — Missing or incorrect API Key
- `403` — Email not Verified, or API Limit Reached, or API Key Disabled
- `429` — Too Many Requests

---

[API](https://skmtc.net/namsor/apis/namsor-api-v2.md) · [All operations](https://skmtc.net/namsor/apis/namsor-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/namsor/namsor-api-v2/versions/305e4f6eeaf5/schema)
