Cobra Systems API reference.
Compact documentation for the live weather, GeoIP, currency, QR code, and jokes endpoints.
Quick start
Use your API key as a bearer token, then call any endpoint under /api/v1.
# Fetch weather data with a single request
$ curl /api/v1/weather?city=Tokyo \
-H "Authorization: Bearer cobra_sk_live_..."
API catalog
The endpoints documented on this page
Each endpoint below includes the path, parameters, and a sample response.
Current conditions and forecasts for a city or coordinates.
IP lookup with country, city, timezone, and ASN metadata.
Live exchange rates and conversion results.
Generate QR code assets as PNG or SVG.
Lightweight joke responses for demos and playful UI states.
Bearer auth, predictable JSON, and copy-paste examples.
Live demo
Run the real endpoints
This panel calls the actual /api/v1 routes and renders the JSON response.
Choose an endpoint
Click a button to load live data.Endpoint 01
Weather
GET /api/v1/weather
What it returns
Current conditions for a city, with the same response shape used in the existing explorer.
- Query by city name with
?city=Tokyo. - Returns temperature, condition, humidity, and wind speed.
- Use this for dashboards, travel apps, or weather widgets.
GET /api/v1/weather?city=Tokyo
{
"city": "Tokyo",
"temp_c": 21.4,
"condition": "Partly cloudy",
"humidity": 62,
"wind_kph": 11.2
}Endpoint 02
GeoIP
GET /api/v1/geoip
What it returns
Geolocation data for an IP address, useful for personalization and analytics.
- Pass the target IP as
?ip=8.8.8.8. - Includes country, city, timezone, and ASN information.
- Can be used to enrich logs or tailor content by region.
GET /api/v1/geoip?ip=8.8.8.8
{
"ip": "8.8.8.8",
"country": "United States",
"city": "Mountain View",
"timezone": "America/Los_Angeles",
"asn": "AS15169 Google LLC"
}Endpoint 03
Currency
GET /api/v1/currency
What it returns
Exchange-rate data and a computed conversion result. The explorer already exposes the same route.
- Use
?from=USD&to=EURand optionally&amount=100. - Includes the current rate and a server timestamp.
- Great for checkout flows and finance widgets.
GET /api/v1/currency?from=USD&to=EUR&amount=100
{
"from": "USD",
"to": "EUR",
"amount": 100,
"rate": 0.9213,
"result": 92.13,
"updated": "2026-07-26T09:00:00Z"
}Endpoint 04
QR Code
POST /api/v1/qrcode
What it returns
Generates a deterministic QR-style SVG payload for the provided text and returns it as JSON.
- Send JSON with the text to encode, output format, and size.
- Returns an SVG string and a data URL that can be rendered or downloaded.
- Useful for onboarding, posters, and share links.
POST /api/v1/qrcode
Content-Type: application/json
{
"text": "https://cobrasystems.tech",
"format": "svg",
"size": 512
}
{
"format": "svg",
"size": 512,
"data_url": "data:image/svg+xml;utf8,...",
"svg": "<svg ...>...</svg>"
}Endpoint 05
Jokes
GET /api/v1/jokes
What it returns
A lightweight joke response for demos, loading states, and playful product moments.
- Filter with
?category=devor omit the category for a default joke. - Designed to be easy to render in a card or toast.
- Matches the current interactive explorer sample.
GET /api/v1/jokes?category=dev
{
"id": 42,
"category": "dev",
"text": "There are 10 kinds of people: those who understand binary and those who dont."
}Reference
Responses and errors
These are the common status codes and expectations for the API family.
| Status | Meaning | When to expect it |
|---|---|---|
| 200 | OK | The request succeeded and the response body contains the requested data. |
| 400 | Bad Request | A required query parameter or JSON field is missing or invalid. |
| 401 | Unauthorized | The Authorization header is missing or the bearer token is invalid. |
| 404 | Not Found | The requested endpoint does not exist or the requested resource could not be located. |
| 429 | Too Many Requests | The caller has exceeded the allowed request rate for the current window. |