Cobra Systems logo Cobra Systems API docs
API reference

Cobra Systems API reference.

Compact documentation for the live weather, GeoIP, currency, QR code, and jokes endpoints.

5public endpoints
JSONclean responses
Bearertoken auth

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_..."

The endpoints documented on this page

Each endpoint below includes the path, parameters, and a sample response.

Weather

Current conditions and forecasts for a city or coordinates.

GeoIP

IP lookup with country, city, timezone, and ASN metadata.

Currency

Live exchange rates and conversion results.

QR Code

Generate QR code assets as PNG or SVG.

Jokes

Lightweight joke responses for demos and playful UI states.

Shared behavior

Bearer auth, predictable JSON, and copy-paste examples.

Run the real endpoints

This panel calls the actual /api/v1 routes and renders the JSON response.

Choose an endpoint

Ready
Click a button to load live data.

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.
Sample response
GET /api/v1/weather?city=Tokyo { "city": "Tokyo", "temp_c": 21.4, "condition": "Partly cloudy", "humidity": 62, "wind_kph": 11.2 }

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.
Sample response
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" }

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=EUR and optionally &amount=100.
  • Includes the current rate and a server timestamp.
  • Great for checkout flows and finance widgets.
Sample response
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" }

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.
Sample response
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>" }

Jokes

GET /api/v1/jokes

What it returns

A lightweight joke response for demos, loading states, and playful product moments.

  • Filter with ?category=dev or omit the category for a default joke.
  • Designed to be easy to render in a card or toast.
  • Matches the current interactive explorer sample.
Sample response
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." }

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.
For consistent integrations, always parse the JSON body first and handle non-2xx responses as structured API errors.