# Words to Numbers API

> Words to Numbers converts spelled-out number phrases into numeric digits. Pass written words to receive the calculated number, formatted English notation, and total digit counts.

**Endpoint:** `GET https://api.apiverve.com/v1/wordstonumbers`  
**Category:** Data Conversion  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/wordstonumbers

## Overview

Words to Numbers works by converting words to numbers using a predefined set of rules. It supports a wide range of words and provides the equivalent numbers in a structured format.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/wordstonumbers?words=seven%20thousand%20six%20hundred%20and%20twenty" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `words` | string | Yes | The words to convert to numbers, e.g. two hundred forty-five, minus seven, three point five or 2 million |

## Response fields

- `number` — string · Numeric representation of the input words
- `words` — string · Original words formatted in standard English notation
- `ordinal` — string · Ordinal form of the number in words · (premium)
- `numberOfDigits_numeric` — number · Count of individual digits in the number
- `numberOfDigits_words` — string · Digit count expressed in words format
- `eachNumber` — array · Array with each digit represented as a word · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "number": "7620",
    "words": "seven thousand, six hundred twenty",
    "ordinal": "seven thousand, six hundred twentieth",
    "numberOfDigits_numeric": 4,
    "numberOfDigits_words": "four",
    "eachNumber": [
      "seven",
      "six",
      "two",
      "zero"
    ]
  }
}
```

## Use cases

- **Check Amount Extraction** — When scanning physical checks or legal agreements, extract spelled-out dollar amounts and convert them into numeric totals for accounting systems.
- **Voice Order Intake** — Food delivery ordering systems convert spoken quantity phrases captured from customer audio into integers to add items to carts.
- **Survey Form Normalization** — To prevent database validation errors, transform written numerical survey responses into standardized digits before saving records.
- **Invoice Total Verification** — Extract written values from scanned invoices and convert them to digits to verify purchase totals against line items.

## SDKs

- **npm** — `npm install @apiverve/wordstonumbers` (https://www.npmjs.com/package/@apiverve/wordstonumbers)
- **PyPI** — `pip install apiverve-wordstonumbers` (https://pypi.org/project/apiverve-wordstonumbers/)
- **NuGet** — `dotnet add package APIVerve.API.WordstoNumbers` (https://www.nuget.org/packages/APIVerve.API.WordstoNumbers)
- **Source** — https://github.com/apiverve/wordstonumbers-api

## More

- Full reference: https://docs.apiverve.com/ref/wordstonumbers
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
