Documentation
Everything you need to authenticate, call endpoints and handle responses. Every example is copy-paste ready.
Introduction
The Cobra Systems API is built around live provider-backed data endpoints, with a few local utility helpers for string and format tasks. All responses are JSON. The base URL for every request is:
/v1The Cobra Systems API endpoints are public and do not require API keys. Call any endpoint directly — all responses are JSON.
Authentication
No authentication is required to call the endpoints documented here.
/v1/weather?city=Tokyo
Quickstart
Make your first request in any language. Examples below show how to call the endpoints.
$ curl "/v1/weather?city=Tokyo"
const res = await fetch("/v1/weather?city=Tokyo") const data = await res.json()
import requests r = requests.get("/v1/weather", params={"city": "Tokyo"})
Rate limits
The free tier includes an unlimited monthly request quota with a fair-use burst limit to protect the platform. Every response includes headers so you always know where you stand.
| Header | Example | Description |
|---|---|---|
| X-RateLimit-Limit | 120 | Requests allowed per rolling minute. |
| X-RateLimit-Remaining | 118 | Requests left in the current window. |
| X-RateLimit-Reset | 1723190400 | Unix timestamp when the window resets. |
Exceeding the burst limit returns a 429 Too Many Requests response. Paid plans raise the burst ceiling — see pricing.
Errors
Cobra uses conventional HTTP status codes. Errors return a JSON body with a machine-readable code and a human-readable message.
{ "error": { "code": "server_error", "message": "An error occurred." } }
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | A required parameter is missing or malformed. |
| 401 | unauthorized | Unauthorized request. |
| 404 | not_found | The requested resource does not exist. |
| 429 | rate_limited | Burst limit exceeded — slow down and retry. |
| 500 | server_error | Something went wrong on our end. |
Weather
Returns current conditions and a short forecast for a city name or coordinate pair.
| Parameter | Type | Description |
|---|---|---|
| city | string | City name, e.g. Tokyo. Required if lat/lon omitted. |
| lat | number | Latitude. Use with lon. |
| lon | number | Longitude. Use with lat. |
| units | string | metric (default) or imperial. |
{ "city": "Tokyo", "temp_c": 21.4, "condition": "Partly cloudy" }
GeoIP
Resolves an IP address to country, city, timezone and network information.
| Parameter | Type | Description |
|---|---|---|
| ip | string | IPv4 or IPv6 address. Defaults to the caller's IP. |
{ "ip": "8.8.8.8", "country": "United States", "city": "Mountain View" }
Currency
Live and historical exchange rates across common currencies.
| Parameter | Type | Description |
|---|---|---|
| from | string | Source ISO 4217 code, e.g. USD. |
| to | string | Target ISO 4217 code, e.g. EUR. |
| date | string | Optional YYYY-MM-DD for a historical rate. |
{ "from": "USD", "to": "EUR", "rate": 0.9213 }
QR codes
Generates a QR code image and returns the SVG or PNG payload inline. Send a JSON body.
| Field | Type | Description |
|---|---|---|
| data | string | The text or URL to encode. Required. |
| size | number | Pixel size, 128–1024. Defaults to 512. |
| format | string | png (default) or svg. |
{ "format": "png", "url": "https://cdn.cobrasystems.tech/qr/9f2a1c.png" }
Jokes
Random jokes by category — perfect for demos and side projects.
| Parameter | Type | Description |
|---|---|---|
| category | string | Optional. dev, general or pun. |
{ "id": 42, "category": "dev", "text": "There are 10 kinds of people..." }
Search
Search the web and return a compact list of result titles, URLs and snippets.
| Parameter | Type | Description |
|---|---|---|
| q | string | Search query. Required. |
| safesearch | string | moderate (default), strict / on, or off. |
{ "provider": "Cobra Systems", "query": "cats", "count": 10, "results": [ { "title": "Cat - Wikipedia", "url": "https://en.wikipedia.org/wiki/Cat", "snippet": "A small domesticated carnivorous mammal." } ] }
$ curl "/v1/search?q=cats&safesearch=moderate"
Time
Returns the current server time in multiple formats (unix, ISO) and the server timezone.
{
"unix": 1723190400,
"iso": "2026-08-10T12:00:00.000Z",
"timezone": "UTC"
}Echo
Echoes back query parameters or JSON body you send — useful for testing clients and webhooks.
| Parameter | Type | Description |
|---|---|---|
| Any | string|number|object | All provided query params or POST JSON are returned under the data key. |
{
"data": { "foo": "bar", "num": "42" }
}Status
Lightweight service status: uptime, memory usage and basic host info.
{
"uptime": 12345,
"memory": { "rss": 12345678 },
"platform": "linux"
}Quote
Returns a short inspirational or fun quote. No parameters required.
{
"id": 7,
"text": "Do or do not. There is no try.",
"author": "Yoda"
}Lorem
Generates placeholder lorem text. Optionally set paras (number of paragraphs) and words per paragraph.
| Parameter | Type | Description |
|---|---|---|
| paras | number | Paragraph count (default 1) |
| words | number | Words per paragraph (default 50) |
{
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
}IP
Returns the caller IP and any forwarded headers (X-Forwarded-For / X-Real-IP).
{
"ip": "203.0.113.5",
"xff": "203.0.113.5, 198.51.100.1"
}Math
Simple math operations. Use op (add, sub, mul, div) and numeric params a and b.
| Parameter | Type | Description |
|---|---|---|
| op | string | Operation: add, sub, mul, div |
| a | number | Left operand |
| b | number | Right operand |
{
"op": "mul",
"a": 6,
"b": 7,
"result": 42
}UUID
Generate one or more UUIDs without any external dependency.
{
"version": "4",
"uuid": "550e8400-e29b-41d4-a716-446655440000"
}Hash
Hash text with common algorithms like sha256, sha512 and md5.
{
"algorithm": "sha256",
"digest": "2cf24dba5fb0a30e..."
}Base64
Encode or decode Base64 text locally.
{
"mode": "encode",
"result": "aGVsbG8="
}Slug
Turn titles or phrases into URL-friendly slugs.
{
"slug": "hello-world"
}Fortune
Returns a short random fortune for dashboards, demos and tiny dopamine hits.
{
"category": "work",
"text": "A clean endpoint today saves a debugging session tomorrow."
}Validate
Validate emails, URLs, IP addresses, hex strings, slugs and JSON payload text.
{
"type": "email",
"valid": true
}OpenAPI
Machine-readable OpenAPI 3.0 specification for the v1 API. Use this URL to import the API into tools like Swagger, Postman or Redoc.
/v1/openapi.json
Ready to build?
All endpoints are public and require no API key. If you need help or have questions, get support on Discord.
Cobra Systems