API Documentation

Integrate with Saaspa.ge to access product data, user profiles, and more. Our RESTful API is designed to be simple and powerful.

Quick Start

Base URL

https://saaspa.ge/api

All API endpoints are relative to this base URL

Example Request

GET
https://saaspa.ge/api/products
# Get all products

Authentication

API Key Authentication

For public endpoints, no authentication is required. For protected endpoints, include your API key in the request headers.

Authorization: Bearer YOUR_API_KEY

Session Authentication

For user-specific endpoints, you can authenticate using session cookies from the web interface.

Cookie: session=YOUR_SESSION_TOKEN

Rate Limiting

LimitWindowDescription
100 requestsper minuteGeneral API endpoints
1000 requestsper hourProduct listing endpoints
10 requestsper minuteAuthentication endpoints

API Endpoints

GET/api/products

Get all products with pagination and filtering

Parameters

pagenumberPage number (default: 1)
limitnumberItems per page (default: 20)
categorystringFilter by category ID
statusstringFilter by status (DRAFT, PENDING, LAUNCHED)

Response

{
  "success": true,
  "data": {
    "products": "Array of product objects",
    "pagination": "Pagination metadata"
  }
}
GET/api/products/[id]

Get a specific product by ID

Parameters

idstringProduct ID

Response

{
  "success": true,
  "data": "Product object"
}
POST/api/products

Create a new product (requires authentication)

Parameters

namestringProduct name (required)
descriptionstringProduct description (required)
urlstringProduct URL (required)
categoryIdstringCategory ID (required)
tagsstring[]Array of tags
alternativesstring[]Array of alternative products

Response

{
  "success": true,
  "data": "Created product object"
}
GET/api/categories

Get all categories

Response

{
  "success": true,
  "data": "Array of category objects"
}
GET/api/users/[username]

Get user profile by username

Parameters

usernamestringUsername

Response

{
  "success": true,
  "data": "User profile object"
}
POST/api/votes

Vote on a product (requires authentication)

Parameters

productIdstringProduct ID (required)
typestringVote type: 'up' or 'down' (required)

Response

{
  "success": true,
  "message": "Vote recorded successfully"
}

Error Codes

CodeMessageDescription
400Bad RequestInvalid request parameters
401UnauthorizedAuthentication required
403ForbiddenInsufficient permissions
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error

SDKs and Libraries

JavaScript SDK

Official JavaScript/TypeScript SDK for Node.js and browsers

View on GitHub →

Python SDK

Official Python SDK for easy integration

View on GitHub →

Postman Collection

Complete Postman collection for testing

Download Collection →

Code Examples

JavaScript

// Get all products
const
response = await fetch('https://saaspa.ge/api/products');
const
products = await response.json();

// Create a product
const
newProduct = await fetch('https://saaspa.ge/api/products', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Product',
description: 'Product description',
url: 'https://example.com'
})
});

Python

import requests

# Get all products
response = requests.get('https://saaspa.ge/api/products')
products = response.json()

# Create a product
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}

data = {
'name': 'My Product',
'description': 'Product description',
'url': 'https://example.com'
}

response = requests.post(
'https://saaspa.ge/api/products',
headers=headers,
json=data
)

Need Help?

Have questions about our API or need help with integration? Our developer support team is here to help.