--- title: API Reference description: The API reference is a detailed documentation of all the endpoints available in the SVGL API. --- ## Introduction SVGL API is a RESTFul API that allows you to get all the information of the SVGs that are in the repository. ## Limitations The API is currently open to everyone and does not require any authentication. However, to prevent abusive use of the API, there is a limit to the number of requests. ## Base URL The base URL for the API is: ```bash https://api.svgl.app # or https://api.svgl.app/categories ``` ## Typescript usage - For categories: ```ts export interface Category { category: string; total: number; } ``` - For SVGs: ```ts type ThemeOptions = { light: string; dark: string; }; export interface iSVG { id: number; title: string; category: string | string[]; route: string | ThemeOptions; wordmark?: string | ThemeOptions; url: string; } ``` ## Endpoints ```bash https://api.svgl.app ```

```json // Returns: [ { "id": 0, "title": "Discord", "category": "Software", "route": "https://svgl.app/discord.svg", "url": "https://discord.com/" }, ... ] ```
```bash https://api.svgl.app?limit=10 ```

```json // Returns: [ { "id": 0, "title": "Discord", "category": "Software", "route": "https://svgl.app/discord.svg", "url": "https://discord.com/" }, ... ] ```
```bash https://api.svgl.app/category/software ```

```json // Returns: [ { "id": 0, "title": "Discord", "category": "Software", "route": "https://svgl.app/discord.svg", "url": "https://discord.com/" }, ... ] ``` The list of categories is available [here](https://github.com/pheralb/svgl/blob/main/src/types/categories.ts) (except for the _all_ category).
```bash https://api.svgl.app/categories ```

```json // Returns: [ { "category": "Software", "total": 97 }, { "category": "Library", "total": 25 }, ... ] ```
```bash https://api.svgl.app?search=axiom ```

```json // Returns: [ { "id": 267, "title": "Axiom", "category": "Software", "route": { "light": "https://svgl.app/axiom-light.svg", "dark": "https://svgl.app/axiom-dark.svg" }, "url": "https://axiom.co/" } ] ```