> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spidra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Scrape Log Details

> Retrieve the full details of a single scrape log, including the original request, token usage, and the complete extracted result.

This endpoint returns everything about a single scrape operation. Unlike the list endpoint, it includes the `result_data` field containing the full extracted content. Use this when you need to inspect or retrieve the output of a specific scrape job.

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.spidra.io/api/scrape-logs/log-uuid-1 \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.spidra.io/api/scrape-logs/log-uuid-1",
      headers={"x-api-key": "YOUR_API_KEY"}
  )
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.spidra.io/api/scrape-logs/log-uuid-1",
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );
  ```
</CodeGroup>

## Response Fields

| Field                  | Type                     | Description                                                                                                   |
| ---------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------- |
| `uuid`                 | string                   | Unique identifier for this log record                                                                         |
| `status`               | string                   | `success`, `error`, or `in_progress`                                                                          |
| `started_at`           | string                   | ISO 8601 timestamp when the scrape started                                                                    |
| `finished_at`          | string or null           | ISO 8601 timestamp when the scrape completed                                                                  |
| `error_message`        | string or null           | Details about the failure if `status` is `error`                                                              |
| `urls`                 | array                    | The list of URLs that were scraped, matching the original request                                             |
| `extraction_prompt`    | string or null           | The AI prompt that was used, if any                                                                           |
| `input_tokens`         | number or null           | Input tokens consumed by the AI                                                                               |
| `output_tokens`        | number or null           | Output tokens generated by the AI                                                                             |
| `tokens_used`          | number or null           | Total tokens consumed                                                                                         |
| `captcha_solved_count` | number or null           | Number of CAPTCHAs solved during this request                                                                 |
| `scraped_sites_count`  | number or null           | Number of URLs successfully scraped                                                                           |
| `latency_ms`           | number or null           | Total duration of the scrape in milliseconds                                                                  |
| `credits_used`         | number or null           | Credits deducted from your account                                                                            |
| `result_data`          | object or string or null | The full extracted content. The shape depends on whether you used a `prompt` and what `output` format was set |

## Example Response

```json theme={null}
{
  "status": "success",
  "data": {
    "uuid": "log-uuid-1",
    "status": "success",
    "started_at": "2025-12-17T15:00:00Z",
    "finished_at": "2025-12-17T15:00:05Z",
    "error_message": null,
    "urls": [
      { "url": "https://example.com/products/laptop" }
    ],
    "extraction_prompt": "Extract the product name, price, and availability",
    "input_tokens": 1240,
    "output_tokens": 86,
    "tokens_used": 1326,
    "captcha_solved_count": 0,
    "scraped_sites_count": 1,
    "latency_ms": 4820,
    "credits_used": 2,
    "result_data": {
      "product_name": "ProBook 15 Laptop",
      "price": 899.99,
      "availability": "In stock"
    }
  }
}
```

<Note>
  The list endpoint (`GET /scrape-logs`) excludes `result_data` to keep responses fast when you are loading many records. Always use this single-record endpoint when you need the actual scraped content.
</Note>


## OpenAPI

````yaml GET /scrape-logs/{uuid}
openapi: 3.1.0
info:
  title: Spidra API
  version: 1.0.0
  description: >-
    Public API endpoints for web scraping via Spidra. Authentication is via API
    key passed in the `x-api-key` header.
servers:
  - url: https://api.spidra.io/api
security:
  - ApiKeyAuth: []
paths:
  /scrape-logs/{uuid}:
    get:
      tags:
        - Scrape Logs
      summary: Get Scrape Log Details
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
          description: UUID of the scrape log
      responses:
        '200':
          description: Full scrape log details
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    $ref: '#/components/schemas/ScrapeLogDetail'
              example:
                status: success
                data:
                  uuid: log-uuid-1
                  status: success
                  started_at: '2025-06-07T15:00:00Z'
                  finished_at: '2025-06-07T15:00:05Z'
                  urls:
                    - url: https://example.com
                  extraction_prompt: Get the main content
                  tokens_used: 1500
                  result_data:
                    title: Example Domain
                    content: This domain is for examples.
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Access token invalid or expired
        '404':
          description: Log not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Log not found
components:
  schemas:
    ScrapeLogDetail:
      type: object
      description: Full scrape log details including result data
      allOf:
        - $ref: '#/components/schemas/ScrapeLogSummary'
        - type: object
          properties:
            result_data:
              type:
                - string
                - object
              description: The scraped/extracted data
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
      required:
        - status
        - message
    ScrapeLogSummary:
      type: object
      description: Summary of a scrape log (excludes result_data for performance)
      properties:
        uuid:
          type: string
          description: Unique identifier for the log
        status:
          type: string
          enum:
            - success
            - error
            - in_progress
        started_at:
          type: string
          format: date-time
        finished_at:
          type: string
          format: date-time
          nullable: true
        error_message:
          type: string
          nullable: true
        urls:
          type: array
          items:
            $ref: '#/components/schemas/ScrapeUrl'
        extraction_prompt:
          type: string
          nullable: true
        input_tokens:
          type: number
          nullable: true
        output_tokens:
          type: number
          nullable: true
        tokens_used:
          type: number
          nullable: true
        captcha_solved_count:
          type: number
          nullable: true
        scraped_sites_count:
          type: number
          nullable: true
        latency_ms:
          type: number
          nullable: true
        credits_used:
          type: number
          nullable: true
    ScrapeUrl:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
          description: The URL to scrape
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ScrapeAction'
          description: Optional browser actions to perform before scraping
        useProxy:
          type: boolean
          description: Override the request-level useProxy setting for this specific URL
    ScrapeAction:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - click
            - type
            - wait
            - scroll
            - check
            - uncheck
            - forEach
          description: Action type to perform on the page
        selector:
          type: string
          description: >-
            CSS selector or XPath for the target element (e.g., '#button',
            '.submit-btn')
        value:
          type:
            - string
            - number
          description: >-
            For click/check/uncheck: plain English element description for AI
            targeting. For type: the text to type. For wait: milliseconds. For
            scroll: percentage ('50%') or pixels. For forEach: natural language
            instruction describing elements to find.
        timeout:
          type: number
          description: Timeout in milliseconds for element visibility
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````