# PasterLink Bulk Uploader

This folder contains a ready-to-run bulk uploader script for the PasterLink API.

## 1) Add your API key

Open `api_key.txt` and paste your API key (from Creator Dashboard → API Keys).

```
plk_live_your_real_key_here
```

## 2) Choose an upload mode

### Simple mode (TXT)

Edit `upload.txt` with one paste body per line:

```
First paste body
Second paste body
```

### Advanced mode (CSV)

Edit `upload.csv` with a `title` and `body` column:

```
title,body
My first title,This is the body
,This paste has no title
```

> Title is optional. If it is blank, the paste will be created without a title.

The download includes an `upload.csv` that contains only the header row, so it uploads nothing until you add rows. The script reads both `upload.txt` and `upload.csv` when they have content, so empty the file you are not using.

## 3) Run the script

```
python main.py
```

## Rate limits

The API allows 60 requests per minute per API key. If it answers `429 Too Many Requests`, the script waits for the number of seconds in the `Retry-After` header and tries again, up to 5 times per paste. If the API still refuses, or asks for a wait longer than 120 seconds, the script stops and saves the results so far.

To continue after a stop, remove the entries that already appear in the output file from your input file, then run the script again. Otherwise those pastes are created twice.

## Output files

The script generates:

- `pasterlink.txt` (for TXT uploads)
- `pasterlink.csv` (for CSV uploads)

## Privacy

- Your API key stays on your machine.
- No data is collected by this script.