API Documentation
REST API with JSON in, JSON out. Version 1.0.
Overview
The Today's World API is a REST API that accepts JSON and returns JSON. All endpoints require authentication
via an API key. The base URL is https://api.todaysworld.com.
Rate limit: 60 requests per minute.
Authentication
Include your API key in the x-api-key header on every request.
x-api-key: YOUR_API_KEY Rate Limits
The API allows 60 requests per minute per API key.
When you exceed the limit, you'll receive a 429 Too Many Requests response with a Retry-After header indicating when you can retry.
Endpoints
/v1/extract/invoice Extracts structured data from invoice documents including vendor info, line items, totals, and payment details.
Request Body
{
"document_text": "string (required) — the raw invoice text"
} Example
curl -X POST https://api.todaysworld.com/v1/extract/invoice \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "ACME Corp\nInvoice #42\nTotal: $500"}' Response
{
"extraction": {
"vendor_name": "ACME Corp",
"invoice_number": "42",
"date": null,
"due_date": null,
"line_items": [],
"subtotal": null,
"tax": null,
"total": 500.0,
"payment_method": null
}
} /v1/extract/receipt Extracts structured data from retail or restaurant receipts including merchant, items, and totals.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/extract/receipt \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "Starbucks\nLatte $5.50\nTotal $5.50"}' Response
{
"extraction": {
"merchant": "Starbucks",
"date": null,
"items": [{"description": "Latte", "amount": 5.50}],
"subtotal": null,
"tax": null,
"total": 5.50,
"payment_method": null
}
} /v1/extract/resume Parses resume or CV documents, extracting contact info, work experience, education, and skills.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/extract/resume \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "Jane Doe\njane@email.com\nSoftware Engineer at Google 2020-2024"}' Response
{
"extraction": {
"name": "Jane Doe",
"email": "jane@email.com",
"phone": null,
"experience": [{"company": "Google", "title": "Software Engineer", "start": "2020", "end": "2024"}],
"education": [],
"skills": []
}
} /v1/extract/business-card Extracts contact details from business card text including name, title, company, email, phone, and address.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/extract/business-card \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "John Smith\nCEO\nAcme Inc\njohn@acme.com"}' Response
{
"extraction": {
"name": "John Smith",
"title": "CEO",
"company": "Acme Inc",
"email": "john@acme.com",
"phone": null,
"website": null,
"address": null
}
} /v1/extract/contract Identifies key contract terms including parties, effective date, payment terms, termination clauses, and obligations.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/extract/contract \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "Service Agreement between Acme and Client..."}' Response
{
"extraction": {
"parties": ["Acme", "Client"],
"effective_date": null,
"expiry_date": null,
"payment_terms": null,
"termination_notice_days": null,
"key_obligations": [],
"governing_law": null
}
} /v1/extract/bank-statement Parses bank statements to extract account info, transactions, opening/closing balances, and period dates.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/extract/bank-statement \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "Chase Bank Statement\nOpening: $1,000\nDeposit $500\nClosing: $1,500"}' Response
{
"extraction": {
"bank_name": "Chase Bank",
"account_number": null,
"period_start": null,
"period_end": null,
"opening_balance": 1000.0,
"closing_balance": 1500.0,
"transactions": [{"date": null, "description": "Deposit", "amount": 500.0, "type": "credit"}]
}
} /v1/analyze/sentiment Analyzes the sentiment of any text, returning a label (positive/negative/neutral) and confidence score.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/analyze/sentiment \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "I love this product! Best purchase ever."}' Response
{
"analysis": {
"sentiment": "positive",
"confidence": 0.97,
"emotions": ["joy", "satisfaction"],
"summary": "Strongly positive review expressing love for the product."
}
} /v1/analyze/email-intent Classifies the intent of an email — meeting request, complaint, inquiry, follow-up, and more.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/analyze/email-intent \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "Can we schedule a call to discuss Q2 budget?"}' Response
{
"analysis": {
"primary_intent": "meeting_request",
"secondary_intents": ["budget_discussion"],
"urgency": "medium",
"action_required": true,
"summary": "Request to schedule a call about Q2 budget."
}
} /v1/analyze/support-ticket Classifies and prioritizes support tickets by category, urgency, and recommended routing.
Request Body
{
"document_text": "string (required)"
} Example
curl -X POST https://api.todaysworld.com/v1/analyze/support-ticket \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"document_text": "I cannot login to my account and have a presentation in 1 hour!"}' Response
{
"analysis": {
"category": "authentication",
"priority": "high",
"urgency": "immediate",
"sentiment": "frustrated",
"suggested_team": "tier1_support",
"summary": "User locked out of account with time-sensitive need."
}
} /v1/transform/text-to-json Converts any unstructured text to structured JSON. Provide an optional schema hint to guide the extraction.
Request Body
{
"document_text": "string (required)",
"schema_hint": "string (optional) — JSON schema describing desired output"
} Example
curl -X POST https://api.todaysworld.com/v1/transform/text-to-json \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"document_text": "MacBook Pro 14 inch, $1999, in stock, rated 4.8 stars",
"schema_hint": "{\"name\": \"string\", \"price\": \"number\", \"in_stock\": \"boolean\"}"
}' Response
{
"result": {
"name": "MacBook Pro 14 inch",
"price": 1999,
"in_stock": true
}
} Error Codes
| Status | Name | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid request body. Check that document_text is present. |
| 401 | Unauthorized | Missing or invalid API key. Include a valid x-api-key header. |
| 408 | Request Timeout | Processing took too long. Try with a shorter document. |
| 429 | Too Many Requests | Rate limit exceeded (60 req/min). Check the Retry-After header. |
| 500 | Internal Server Error | Unexpected server error. Please retry, and contact support if it persists. |
Ready to integrate?
Get your API key on RapidAPI. Free tier included.