logo

API Overview

Complete overview of the API Cheap REST API endpoints and capabilities.

API Overview

The API Cheap REST API provides access to multiple third-party APIs through a unified interface. All endpoints follow RESTful conventions and return JSON responses.

Base URL

https://api.apicheap.com/v1

Available APIs

ServiceEndpointDescriptionCredits
Weather/weatherCurrent weather data1
Geocoding/geocodingLocation coordinates1
News/newsLatest news articles2
Currency/currencyExchange rates1
QR Code/qrQR code generation1
Image Processing/imageImage manipulation3
SMS/smsSend SMS messages5
Email/emailSend emails2

Request Format

All requests should include:

  • Content-Type: application/json
  • Authorization: Bearer YOUR_API_KEY

Example Request

curl -X GET \
  "https://api.apicheap.com/v1/weather?city=paris" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response Format

All responses follow this structure:

{
  "status": "success|error",
  "data": {}, // Response data (success only)
  "error": {}, // Error details (error only)
  "usage": {
    "credits_used": 1,
    "remaining_credits": 999
  },
  "meta": {
    "request_id": "req_123456",
    "timestamp": "2024-01-15T14:30:00Z",
    "processing_time": 0.245
  }
}

Status Codes

CodeMeaningDescription
200OKRequest successful
400Bad RequestInvalid parameters
401UnauthorizedInvalid API key
403ForbiddenInsufficient permissions
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error

Error Handling

Error responses include detailed information:

{
  "status": "error",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input parameters",
    "details": {
      "city": "City name is required"
    }
  }
}