API

API allows you to interact with your server programmatically. You can use it to automate tasks like updating, creating and deleting files, and more.

Unofficial docs with code examples: https://nekoapi.nekoweb.org/

API Documentation

API base URL: nekoweb.org/api

Authentication

Send your API key in the Authorization header of your requests.

Rate limiting

Server will return ratelimit-limit, ratelimit-remaining and ratelimit-reset headers in response to requests. If you exceed the limit, you will receive a 429 status code.
Donators get 2-3X rate limit.

/api/files/limits

Get your current rate limit status.

Method: GET
Returns a JSON object with info about status of various rate limits for your account.
Example response:
    
{
    "general": { "limit": 100, "remaining": 99, "reset": 1724615605438 },
    "big_uploads":{ "limit": 5, "remaining": 5, "reset": -1 },
    "zip":{ "limit":1, "remaining": 0,"reset": 1724615028902 }
}
    

If reset is -1, it means reset counter hasn't started yet, and will only appear after you make the first request.
general refers to most of file operations, big_uploads refers to creation of big file uploads, and zip refers to importing and exporting of zip files.

/site/info

Get information about your site.

Method: GET
Returns a JSON object with id, username, title, updates, followers, views, created_at and updated_at properties.

/site/info/:username

Get information about a user's site. Replace :username with the username of the user. This endpoint doesn't require auth if requested from Nekoweb site.

Method: GET
Returns a JSON object with id, username, title, updates, followers, views, created_at and updated_at properties.

/files/create

Create a new file or folder.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • pathname: The path of the file or folder to create. Required.
  • isFolder: false for file, true for folder. Required.

/files/upload

Upload a file or files. This will overwrite old files. Max 100MB.

Content type: multipart/form-data
Method: POST
Parameters:
  • pathname: The path of the folder to upload to. Required.

/files/delete

Delete a file or folder.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • pathname: The path of the file or folder to delete. Required.

/files/rename

Rename/Move a file or folder.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • pathname: The old path of the file or folder. Required.
  • newpathname: The new path of the file or folder. Required.

/files/edit

Edit a file.

Content type: multipart/form-data
Method: POST
Parameters:
  • pathname: The path of the file to edit. Required.
  • content: The new content of the file. Required.

/files/readfolder

Read a folder.

Method: GET
Query parameters:
  • pathname: The path of the folder to read. Required.
Returns a JSON array with objects like this: {name: String, dir: Boolean}

/files/big/create

Create upload for a big file. Allows you to upload files larger than 100MB.

Method: GET
Returns a JSON object with a id property. Use this id to upload the file in chunks.

/files/big/append

Append a chunk to a big file upload. Chunk must be less than 100MB.

Content type: multipart/form-data
Method: POST
Parameters:
  • id: The id of the big file upload. Required.
  • file: Chunk of file. Required.

/files/big/move

Move a big file upload to the final location.

Content type: application/x-www-form-urlencoded
Method: POST
Parameters:
  • id: The id of the big file upload. Required.
  • pathname: The path of the file to move to. Required.

/files/import/:bigid

Import a zip file from a big file upload. Replace :bigid with the id of the big file upload.

Content type: application/x-www-form-urlencoded
Method: POST