Developer API

Convert Programmatically

Integrate GEDCOM ↔ JSON conversion directly into your applications with our simple REST API.

50/hr

Free tier limit

500/hr

With API key

<100ms

Avg response time

Base URL

https://ged2json.com/api/v1

Endpoints

POST/convert

Convert between GEDCOM and JSON formats. Returns the converted data directly in the response.

Request Body (JSON)

FieldTypeRequiredDescription
directionstringYes"ged-to-json" or "json-to-ged"
contentstringYesThe GEDCOM or JSON content to convert

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
X-API-KeyNoYour API key for higher rate limits (500/hr vs 50/hr)

Success Response

{
  "success": true,
  "data": {
    "format": "json",
    "data": {
      "header": { ... },
      "individuals": [ ... ],
      "families": [ ... ],
      "sources": [ ... ]
    },
    "stats": {
      "individuals": 42,
      "families": 15,
      "sources": 8
    }
  }
}

GET/health

Check API status and get version information.

{
  "status": "healthy",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "endpoints": {
    "convert": "/api/v1/convert",
    "health": "/api/v1/health"
  },
  "limits": {
    "anonymous": "50 requests/hour",
    "withApiKey": "500 requests/hour",
    "maxFileSize": "50MB"
  }
}

Code Examples

curl -X POST https://ged2json.com/api/v1/convert \
  -H "Content-Type: application/json" \
  -d '{
    "direction": "ged-to-json",
    "content": "0 HEAD\n1 SOUR MyApp\n0 @I1@ INDI\n1 NAME John /Smith/\n0 TRLR"
  }'

Rate Limiting

Rate limit information is included in response headers:

X-RateLimit-Limit: 50
X-RateLimit-Remaining: 49
X-RateLimit-Reset: 1705312200000

Anonymous

50 requests per hour

Based on IP address

With API Key

500 requests per hour

Contact us for higher limits

Error Codes

CodeHTTP StatusDescription
INVALID_REQUEST400Missing required fields
INVALID_GEDCOM400Malformed GEDCOM content
INVALID_JSON400Malformed JSON content
INVALID_JSON_STRUCTURE400JSON missing required arrays
CONTENT_TOO_LARGE400Content exceeds 50MB limit
RATE_LIMIT_EXCEEDED429Too many requests
CONVERSION_ERROR500Internal conversion failure

Error Response Format

{
  "success": false,
  "error": {
    "message": "Invalid GEDCOM: Missing required HEAD record",
    "code": "INVALID_GEDCOM"
  }
}

File Upload (Alternative)

You can also upload files using multipart/form-data:

curl -X POST https://ged2json.com/api/v1/convert \
  -H "X-API-Key: your-api-key" \
  -F "file=@family-tree.ged" \
  -F "direction=ged-to-json"

Need Higher Limits?

Contact us for enterprise API keys with custom rate limits.