ScratchAPI
Local-first API client

Scratch paper for APIs.

Fire a request, read the answer, move on. ScratchAPI is a quick desktop app for HTTP, with sign-in that looks after itself and collections that are just files on your disk.

  • accounts
  • cloud sync
  • telemetry

v0.4.5 · Linux, macOS, Windows · Free

  1. WriteMethod, URL, params, headers and body. {{variables}} light up as you type.
  2. SendIf a token is missing or expired, the collection signs in first and retries for you.
  3. CapturePull a value out of the response into your environment with one rule.
  4. ReuseKeep it in a collection, copy it as cURL, or export it as JSON.
What's inside

Small app. Not a small feature list.

The highlights are below. The features page covers everything, section by section.

Authentication

Bearer, Basic, API key and OAuth 2.0, set once per collection

Pick a type on the collection and every request inherits it. OAuth 2.0 supports client credentials, password and authorization code with PKCE. Tokens renew before they expire, or after a 401.

BearerBasicAPI keyOAuth 2.0Login request
Capture

Log in once, reuse everywhere

Save accessToken from a response into ACCESS_TOKEN. Done.

Variables

Environments that tell you when you're wrong

Blue when defined, amber when missing, red when circular. Mark secrets as sensitive to keep them masked.

Collections

Folders you can actually open

Click a folder for its overview: counts, subfolders and every request inside, filterable by method.

Responses

Find the needle

Colour-coded JSON, separate Data and Headers tabs, copy button, and Ctrl+F search with highlighted matches.

cURL

In and out

Copy any request as cURL, with values filled in or placeholders kept. Paste a cURL command into the URL field to turn it into a request.

Docs

Notes live with the request

Markdown descriptions on collections and requests, plus an argument list with required or optional flags and defaults.

All features →
Authentication

Sign-in is not your job.

Authentication belongs to the collection, not to a chain of requests you have to remember to run first.

  1. 1Choose how the API signs you inBearer token, Basic, API key in a header or query parameter, OAuth 2.0, or your own login and refresh requests.
  2. 2Send anythingEach request in the collection carries the credentials. No token yet? The login runs first.
  3. 3Expired? Handled.On a 401 the token is renewed and your request is retried once. A note in the response says what happened.
// Collection → Authentication
Type             OAuth 2.0
Grant            Authorization code (PKCE)
Redirect         http://127.0.0.1 (loopback)
Token stored in  active environment

// or: login-request flow
Token variable   ACCESS_TOKEN
Header           Authorization: Bearer {{ACCESS_TOKEN}}
Login request    Authentication / Login
Refresh request  Authentication / Refresh Token
Login and refresh requests always go out without auth. Any request can opt out with “No auth”.
The Capture tab on a login request.
Capture rules

Responses feed the next request.

After a successful (2xx) response, a rule copies a value from a JSON path like data.access_token or items[0].id, or from a response header, into a variable of the active environment. The response panel confirms what was saved and warns when a rule could not apply.

Your data

Just files. Your files.

Collections, environments and history are readable JSON in the app's data folder (~/.config/scratchapi/ on Linux), written owner-only. Back them up, diff them, or export a collection to share it. Environments are never exported, so secrets stay put.

How storage works
{
  "name": "Books API",
  "description": "All requests must be authenticated.",
  "auth": {
    "type": "bearer",
    "token": "{{ACCESS_TOKEN}}"
  },
  "folders": [
    { "name": "Reading", "requests": [
      { "title": "Book Search",
        "method": "GET",
        "url": "{{base_url}}/books/search" }
    ] }
  ]
}
Download

Pick your platform.

A desktop app built for your favourite system.

Linux

Debian and Ubuntu based distributions, as a .deb package.

Get the .deb

macOS

A .dmg for Apple silicon.

Get the .dmg

Windows

An .exe installer for 64-bit Windows.

Get the .exe
# Debian / Ubuntu
sudo apt install ./scratchapi_*_amd64.deb

Updates are manual: check About in the app menu.