Skip to main content

Documentation Index

Fetch the complete documentation index at: https://brezelscraper.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

GET /api/v1/jobs/{id}/results

Fetch the rich result payload for a single job.

Query parameters

ParameterTypeDefaultNotes
pageinteger1Must be positive
limitinteger50Max 100

Example response

{
  "results": [
    {
      "id": 1,
      "user_id": "user_123",
      "job_id": "d8d8a24e-cef2-4b02-8396-abc290b6f299",
      "title": "Cafe Example",
      "category": "Cafe",
      "address": "Example Street 1, Berlin",
      "website": "https://example.com",
      "phone": "+49 30 123456",
      "review_count": 128,
      "rating": 4.6,
      "open_hours": {
        "monday": ["08:00-18:00"]
      },
      "images": [],
      "user_reviews": [],
      "emails": "hello@example.com",
      "created_at": "2026-04-10T09:05:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 50,
  "has_more": false
}
Useful fields include:
  • title, category, address, website, phone
  • review_count, rating, reviews_link
  • open_hours, popular_times, reviews_per_rating
  • images, reservations, order_online, menu, owner
  • user_reviews, user_reviews_extended
  • emails
The example above is abbreviated. The full response includes additional fields such as latitude, longitude, description, timezone, price_range, popular_times, reviews_per_rating, complete_address, about, reservations, order_online, menu, owner, user_reviews, and images when available. Optional fields are omitted from the response when empty.
If the job is in failed status, this endpoint returns 402 Payment Required with a billing failure message.

GET /api/v1/results

Fetch a flat result list across all of your jobs.

Query parameters

ParameterTypeDefaultNotes
limitinteger50Max 100
offsetinteger0Must be non-negative
This endpoint returns a plain JSON array of result objects rather than a paginated envelope.

GET /api/v1/jobs/{id}/download

Download the CSV file for a job. Current behavior:
  • Response content type is text/csv
  • Response includes Content-Disposition with the generated file name
  • Invalid UUID values return 422 Unprocessable Entity
  • Missing or unavailable CSV output returns 404 Not Found
  • Failed jobs return 402 Payment Required

Example request

curl -L "https://api.brezelscraper.com/api/v1/jobs/YOUR_JOB_ID/download" \
  -H "Authorization: Bearer bscraper_your_key_here" \
  -o results.csv

GET /api/v1/jobs/{id}/costs

Read the cost breakdown for one job.

Example response

{
  "job_id": "d8d8a24e-cef2-4b02-8396-abc290b6f299",
  "items": [
    {
      "event_type": "job_start",
      "quantity": 1,
      "cost_credits": "0.007000"
    },
    {
      "event_type": "place_scraped",
      "quantity": 400,
      "cost_credits": "1.200000"
    }
  ],
  "total_credits": "1.207000",
  "total_rounded": 1
}
Each event_type represents a billing line item:
Event typeMeaning
job_startOne-time setup fee when the job starts
place_scrapedPer-place fee for each result collected
Cost totals use the pricing rules that were active when the job ran.

POST /api/v1/jobs/costs/batch

Read the cost breakdown for multiple jobs in one request.

Request body

{
  "job_ids": [
    "d8d8a24e-cef2-4b02-8396-abc290b6f299",
    "4b454a90-cd30-42a5-8401-1d8ebd911234"
  ]
}
Notes:
  • Maximum 100 job IDs per request
  • Invalid UUID values return 422 Unprocessable Entity
  • Jobs you do not own are silently omitted from the costs map

Example response

{
  "costs": {
    "d8d8a24e-cef2-4b02-8396-abc290b6f299": {
      "job_id": "d8d8a24e-cef2-4b02-8396-abc290b6f299",
      "items": [
        {
          "event_type": "job_start",
          "quantity": 1,
          "cost_credits": "0.007000"
        },
        {
          "event_type": "place_scraped",
          "quantity": 400,
          "cost_credits": "1.200000"
        }
      ],
      "total_credits": "1.207000",
      "total_rounded": 1
    }
  }
}