Skip to main content
1

Create a TinyFish account

Sign up for a new TinyFish account here.
2

Get your API key

  1. Go to the API Keys page
  2. Click “Create API Key”
  3. Copy and store your key securely in your .env file
API keys are shown only once. Store them securely and never commit them to version control.
.env
TINYFISH_API_KEY=sk-mino-*****
3

Write code for your first workflow

We’ll write the minimal code to navigate to a website and extract product data using natural language.
curl -N -X POST https://agent.tinyfish.ai/v1/automation/run-sse \
  -H "X-API-Key: $TINYFISH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://scrapeme.live/shop",
    "goal": "Extract the first 2 product names and prices"
  }'
4

Run your first workflow

Run the code with the following command:
npx tsx first-automation.ts
5

Verify output

You should see SSE events streaming in your terminal:
{'type': 'STARTED', 'runId': 'abc123'}
{'type': 'STREAMING_URL', 'runId': 'abc123', 'streamingUrl': 'https://stream.mino.ai/session/abc123'}
{'type': 'PROGRESS', 'runId': 'abc123', 'purpose': 'Visit the page to extract product information'}
{'type': 'PROGRESS', 'runId': 'abc123', 'purpose': 'Check for product information on the page'}
{'type': 'COMPLETE', 'runId': 'abc123', 'status': 'COMPLETED', 'resultJson': {
  "products": [
    { "name": "Bulbasaur", "price": "$63.00" },
    { "name": "Ivysaur", "price": "$87.00" },
  ]
}}

Next Steps