SWOTPal Public API
Integrate AI-powered SWOT analysis into your applications with a simple REST API. Generate strategic analyses, run competitive comparisons, and retrieve results programmatically.
Base URL
All API requests should be made to the following base URL:
https://swotpal.com/api/public/v1Authentication
Authenticate every request by including your API key in the Authorization header as a Bearer token.
Authorization: Bearer YOUR_API_KEYDon't have a key yet? Get your free API key from the OpenClaw integration page.
Endpoints
/api/public/v1/swotGenerate a full AI-powered SWOT analysis for any company, product, or strategic topic.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| topic | string | Yes | Subject of the analysis, e.g. "Tesla" or "Remote Work Strategy" |
| language | string | No | ISO 639-1 code. Defaults to "en". Supported: en, ja, zh_TW, ko, de, fr, es, pt, it, ru, ar, hi |
Example Request
curl -X POST https://swotpal.com/api/public/v1/swot \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"topic": "Tesla",
"language": "en"
}'Example Response
{
"id": "swot_abc123",
"topic": "Tesla",
"language": "en",
"created_at": "2026-03-09T12:00:00Z",
"strengths": [
"Market leader in electric vehicles",
"Strong brand and loyal customer base",
"Vertically integrated supply chain"
],
"weaknesses": [
"Production bottlenecks at scale",
"Quality control inconsistencies",
"High dependency on CEO public image"
],
"opportunities": [
"Expanding into emerging EV markets",
"Energy storage and solar growth",
"Autonomous driving technology"
],
"threats": [
"Increasing competition from legacy automakers",
"Regulatory changes in key markets",
"Raw material supply constraints"
]
}/api/public/v1/versusRun an AI-powered competitive comparison between two companies, products, or strategies.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| left | string | Yes | First subject for comparison, e.g. "Nike" |
| right | string | Yes | Second subject for comparison, e.g. "Adidas" |
| language | string | No | ISO 639-1 code. Defaults to "en" |
Example Request
curl -X POST https://swotpal.com/api/public/v1/versus \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"left": "Nike",
"right": "Adidas",
"language": "en"
}'Example Response
{
"id": "vs_def456",
"left": "Nike",
"right": "Adidas",
"language": "en",
"created_at": "2026-03-09T12:00:00Z",
"comparison": {
"left_strengths": ["Stronger brand recognition globally", "..."],
"right_strengths": ["Stronger presence in European football", "..."],
"key_differences": ["Marketing strategy approach", "..."],
"verdict": "Nike leads in global brand power while Adidas excels in ..."
}
}/api/public/v1/analysesRetrieve a paginated list of all analyses created with your API key.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | number | No | Page number. Defaults to 1 |
| limit | number | No | Results per page (1-100). Defaults to 20 |
Example Request
curl https://swotpal.com/api/public/v1/analyses?page=1&limit=10 \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"data": [
{
"id": "swot_abc123",
"type": "swot",
"topic": "Tesla",
"language": "en",
"created_at": "2026-03-09T12:00:00Z"
},
{
"id": "vs_def456",
"type": "versus",
"topic": "Nike vs Adidas",
"language": "en",
"created_at": "2026-03-09T11:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 42,
"total_pages": 5
}
}/api/public/v1/analyses/:idRetrieve the full details of a specific analysis by its ID.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The analysis ID, e.g. "swot_abc123" |
Example Request
curl https://swotpal.com/api/public/v1/analyses/swot_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Example Response
{
"id": "swot_abc123",
"type": "swot",
"topic": "Tesla",
"language": "en",
"created_at": "2026-03-09T12:00:00Z",
"strengths": ["Market leader in electric vehicles", "..."],
"weaknesses": ["Production bottlenecks at scale", "..."],
"opportunities": ["Expanding into emerging EV markets", "..."],
"threats": ["Increasing competition from legacy automakers", "..."]
}Error Codes
The API uses standard HTTP status codes. Error responses include a JSON body with error and message fields.
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters. Check the "message" field for details. |
| 401 | Unauthorized | Invalid or missing API key. Make sure you include a valid Bearer token. |
| 403 | Forbidden | Your API key does not have access to this resource. |
| 404 | Not Found | The requested analysis ID does not exist. |
| 429 | Too Many Requests | Rate limit exceeded. Wait and retry with exponential backoff. |
| 500 | Internal Server Error | Something went wrong on our end. Try again or contact support. |
Error Response Example
{
"error": "INVALID_PARAMETER",
"message": "The 'topic' field is required and must be a non-empty string."
}Rate Limits
API requests are rate-limited to ensure fair usage. Current limits are returned in every response via headers:
| Plan | Requests / minute | Requests / day |
|---|---|---|
| Free | 10 | 100 |
| Pro | 60 | 5,000 |
| Enterprise | 300 | Unlimited |
Rate limit headers included with each response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1741521660When you receive a 429 response, use the X-RateLimit-Reset header (Unix timestamp) to determine when you can retry. Implementing exponential backoff is recommended.
Ready to integrate?
Get your free API key in seconds and start generating AI-powered SWOT analyses from your own applications.
Get Your API Key