Quick Start Guide

GetLinkDB is an instant, zero-setup database service for your frontend projects.

๐Ÿ”‘ What is an API Key?
When you create a database, you receive a unique API Key. You must send this key in all your requests to access your database.

Authentication is done via HTTP Headers:

Authorization: Bearer YOUR_API_KEY_HEREContent-Type: application/json

POSThttps://getlinkdb.com/api/v1/insert

Used to add a new record to your database. Data must be sent in two parts: "collection" (table name) and "data" (content).

Using JavaScript (Fetch API):

To save data when a user fills a registration form:

// Data payload to sendconst payload = { collection: "users", // Table name (e.g., users, messages, products)data: { name: "John Doe", age: 28, job: "Software Developer" } }; // Sending POST request to GetLinkDBfetch('https://getlinkdb.com/api/v1/insert', { method: 'POST', headers: { 'Authorization': 'Bearer gldb_your_secret_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }) .then(response => response.json()) .then(result => console.log("Success:", result)) .catch(error => console.error("Error:", error));

Using Python (Requests):

import requests url = "https://getlinkdb.com/api/v1/insert" headers = { "Authorization": "Bearer gldb_your_secret_key_here", "Content-Type": "application/json" } payload = { "collection": "blog_posts", "data": { "title": "Using API with Python", "views": 150 } } response = requests.post(url, json=payload, headers=headers) print(response.json())

GEThttps://getlinkdb.com/api/v1/get?collection=TABLE_NAME

Allows you to retrieve previously saved data to display on your site. You can filter data by adding "collection=" to the end of the URL.

Using JavaScript (Fetch API):

To list all people in the "users" table:

fetch('https://getlinkdb.com/api/v1/get?collection=users', { method: 'GET', headers: { 'Authorization': 'Bearer gldb_your_secret_key_here' } }) .then(response => response.json()) .then(data => { // Log the retrieved data console.log("Total Records:", data.count); console.log("Users:", data.data); });
๐Ÿ’ก Pro Tip: If you donโ€™t add ?collection= to the URL, ALL data in your database will be retrieved.

Error Codes (Status Messages)

Our system returns HTTP status codes explaining what went wrong in case of an issue.

KodMeaning & Solution
200 / 201Success: Your request was processed successfully.
400Bad Request: Invalid JSON format or missing "collection", "data" fields.
401Unauthorized: Missing or invalid API Key (Bearer Token).
429Too Many Requests: You have reached your monthly API request limit. Upgrade your plan to continue.
507Storage Full: You have reached the MB storage limit of your plan. Data cannot be added.