Skip to content

AJ-LinkShrink/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AJ-Linkshrink

AJ-Linkshrink makes your URL simpler.

Overview

AJ-Linkshrink is a simple URL shortening API that allows you to convert long URLs into shorter, more manageable links. It uses FastAPI for the backend and integrates with Firebase Firestore for storage. The API is deployed on Render for reliable hosting and scalability.

Endpoints

GET /api/get/link

Fetch the data for a short link.

Request

  • Body: A JSON object containing the short URL ID.
    {
        "link_id": "link-id"
    }

Response

  • Example response:
    {
        "link_id": "link-id",
        "short_link": "short-link",
        "original_link": "original-link"
    }

POST /api/post/link

Create a short link for a given long URL.

Request

  • Body: A JSON object containing the long URL.
    {
        "link": "original-link"
    }

Response

  • Example response:
    {
        "link_id": "link-id",
        "short_link": "short-link",
        "original_link": "original-link"
    }