# ULID Generator API

> ULID Generator creates Universally Unique Lexicographically Sortable Identifiers that order records chronologically. Pass an optional batch count and millisecond timestamp to produce 26-character collision-resistant unique IDs with format details.

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

## Overview

Use it to generate ULID values on demand from any language, without adding a dependency. ULID Generator works by combining a timestamp component (10 characters) with random data (16 characters) using Crockford's Base32 alphabet. Results are case-insensitive, sortable, and URL-safe.

## 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/ulidgenerator?count=5&timestamp=1609459200000" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `count` | integer | No | Number of ULIDs to generate. default 1. range 1-100 |
| `timestamp` | integer | No | Custom timestamp in milliseconds (optional, uses current time if not specified) |

## Response fields

- `ulids` — array · Array of generated ULID strings in proper format
- `count` — number · Number of ULIDs generated in this request
- `timestamp` — number · Timestamp in milliseconds used for generation · (premium)
- `format` — string · ULID format specification and component breakdown details
- `sortable` — boolean · Whether generated ULIDs maintain natural chronological sorting
- `case_insensitive` — boolean · Whether ULIDs are case-insensitive for comparison purposes

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "ulids": [
      "01KCMMK564DMMCC17AVBZTVNT1",
      "01KCMMK565ZE4681DFAEWBF95G",
      "01KCMMK566K1REYH0JEK4Q8DKW",
      "01KCMMK5670W9EHFNX76R8FKWH",
      "01KCMMK568SFRY6DCZTZYMR66Y"
    ],
    "count": 5,
    "timestamp": 1765924246724,
    "format": "26 characters (10 timestamp + 16 random)",
    "sortable": true,
    "case_insensitive": true
  }
}
```

## Use cases

- **Database Keys** — Generate sortable primary keys for databases that maintain chronological order
- **Distributed Systems** — Create unique identifiers across distributed systems with time-based sorting
- **Log Aggregation** — Generate sortable IDs for log entries and event tracking systems
- **API Resources** — Create resource identifiers that reveal creation time and sort naturally

## SDKs

- **npm** — `npm install @apiverve/ulidgenerator` (https://www.npmjs.com/package/@apiverve/ulidgenerator)
- **NuGet** — `dotnet add package APIVerve.API.ULIDGenerator` (https://www.nuget.org/packages/APIVerve.API.ULIDGenerator)
- **Source** — https://github.com/apiverve/ulidgenerator-api

## More

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