FetchFox - AI Web Scraper
  • 🦊Welcome to FetchFox
  • Getting Started
    • ⚡Quickstart (Pokémon Edition)
  • Key Concepts
    • ⛓️Scraping Setups
      • Single Page / Single Item
      • Single Page / Multiple Items
      • Multiple Pages / Single Item per Page
      • Multiple Pages / Multiple Items
    • Crawl for URL patterns
    • 📡Deep Scrapes
    • 💵Pricing
  • Integrations
    • Google Sheets
    • Webhooks
    • Make.com
  • n8n
  • Developers
    • HTTP API
      • API Reference
Powered by GitBook
On this page
  • Endpoints
  • Workflows
  • Running Workflows
  • Jobs
  1. Developers
  2. HTTP API

API Reference

This section provides detailed documentation for the main REST API endpoints.

The FetchFox API uses JSON for request and response payloads. All requests must be authenticated with an API key.

  • Base URL: https://fetchfox.ai/api/v2

  • Authentication: Bearer token via the Authorization header

  • Response Format: JSON

Endpoints

All endpoints are relative to the base URL.

Workflows

Get all workflows

  • Method: GET

  • Endpoint: /workflows

  • Example:

curl "https://fetchfox.ai/api/v2/workflows" \
     -H "Authorization: Bearer YOUR_API_KEY"

Get a specific workflow

  • Method: GET

  • Endpoint: /workflow/{workflow_id}

  • Example:

curl "https://fetchfox.ai/api/v2/workflows/12345" \
     -H "Authorization: Bearer YOUR_API_KEY"

Create a new workflow

  • Method: POST

  • Endpoint: /workflows

  • Request Body: JSON representation of a workflow

  • Response: Returns a workflowId

  • Example:

curl "https://fetchfox.ai/api/v2/workflows" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
        "steps": [
            {
                "name": "const",
                "args": {
                    "items": [
                        {
                            "url": "https://pokemondb.net/pokedex/national"
                        }
                    ],
                    "maxPages": 1
                }
            },
            {
                "name": "extract",
                "args": {
                    "questions": {
                        "name": "What is the name of the Pokémon?",
                        "number": "What is the National Dex number of the Pokémon?",
                        "types": "What are the types of the Pokémon?",
                        "url": "What is the URL of the Pokémon'\''s detailed page?"
                    },
                    "mode": "auto",
                    "view": "html",
                    "maxPages": 1,
                    "limit": 10
                }
            }
        ]
    }'

Running Workflows

Run a workflow

  • Method: POST

  • Endpoint: /workflows/{workflow_id}/run

  • Response: Returns a jobId

  • Example:

curl --request POST "https://fetchfox.ai/api/v2/workflows/12345/run" \
     -H "Authorization: Bearer YOUR_API_KEY"

Jobs

Get job details

  • Method: GET

  • Endpoint: /jobs/{job_id}

  • Response: A JSON containing job details including results, and job completion status.

  • Example:

curl "https://fetchfox.ai/api/v2/jobs/12345" \
     -H "Authorization: Bearer YOUR_API_KEY"
PreviousHTTP API

Last updated 2 months ago