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
| Service | Endpoint | Description | Credits |
|---|---|---|---|
| Weather | /weather | Current weather data | 1 |
| Geocoding | /geocoding | Location coordinates | 1 |
| News | /news | Latest news articles | 2 |
| Currency | /currency | Exchange rates | 1 |
| QR Code | /qr | QR code generation | 1 |
| Image Processing | /image | Image manipulation | 3 |
| SMS | /sms | Send SMS messages | 5 |
/email | Send emails | 2 |
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
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid parameters |
| 401 | Unauthorized | Invalid API key |
| 403 | Forbidden | Insufficient permissions |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
Error Handling
Error responses include detailed information:
{
"status": "error",
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input parameters",
"details": {
"city": "City name is required"
}
}
}