> ## 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 a Template Run

> Check a template run and get its rows once it has finished.

Returns the run's status and progress. Once `status` is `completed` or `partial`, `rows` holds the results. Add `?rows=false` while polling to leave the rows out.

```bash theme={null}
curl "https://api.spidra.io/api/template-runs/dfefa844-ad1f-4400-b127-dc17a186d9c2" \
  -H "Authorization: Bearer $SPIDRA_API_KEY"
```

A finished run of **Google Maps leads** for dentists in Lekki, Lagos, with the first of its 20 rows shortened:

```json theme={null}
{
  "status": "success",
  "run": {
    "runId": "dfefa844-ad1f-4400-b127-dc17a186d9c2",
    "template": "google-maps-leads",
    "templateVersion": 4,
    "presetId": null,
    "tool": "batch",
    "status": "completed",
    "inputs": { "query": "dentist", "areas": ["Lekki, Lagos"], "pages": 1, "findContacts": false, "language": "en" },
    "createdAt": "2026-10-24T18:46:01.000Z",
    "finishedAt": "2026-10-24T18:46:05.000Z",
    "creditsUsed": 1,
    "urlCount": 1,
    "rowCount": 20,
    "job": { "tool": "batch", "id": "a566e5de-c46a-476c-a095-b26bd5cc38cf" },
    "progress": { "completed": 1, "failed": 0, "total": 1 },
    "failures": [],
    "rows": [
      {
        "position": 1,
        "title": "Hilton Dental Clinic Lekki",
        "placeId": "ChIJ89e4lQv1OxARxaJDaIA0VIE",
        "googleMapsUrl": "https://www.google.com/maps?cid=9319131255046120133",
        "category": "Dentist",
        "address": "13 Whitesands St, Ikate bustop, Lagos 105102, Lagos, Nigeria",
        "location": { "lat": 6.4293659, "lng": 3.4787779 },
        "phone": "+234 701 007 5124",
        "website": "http://www.hiltondental.com.ng/",
        "domain": "hiltondental.com.ng",
        "rating": 4.9,
        "reviewsCount": 844,
        "businessStatus": "OPERATIONAL",
        "openState": "Closed · Opens 8 AM Mon"
      }
    ]
  }
}
```

## Rows

Each row has every field the site returned, not only the columns the dashboard shows. For Google Maps that's about 50 fields per place (hours, photos, review topics, address parts and more). The template's `columns` from [Get a Template](https://docs.spidra.io/api-reference/templates/get.md) list the fields the table shows by default, with the path to each one.

## Other fields

* `failures`: pages that couldn't be read, with the reason. They aren't charged.
* `followStep`: on templates with a second step switched on (such as **Find emails and social links**), how many websites it checked and what it cost. The run stays `running` until the second step has finished, and its fields are merged into each row.
* `summary`: on rank trackers, how many keywords or points ranked and the average position.
* `job`: the tool job behind the run. For a crawl or parse template, the full result is at that tool's own endpoint, such as [GET /crawl/\{jobId}](https://docs.spidra.io/api-reference/crawling/crawl-status.md).


## OpenAPI

````yaml GET /template-runs/{runId}
openapi: 3.1.0
info:
  title: Spidra API
  version: 1.0.0
  description: >-
    Public API endpoints for web scraping via Spidra. Authenticate with
    `Authorization: Bearer YOUR_API_KEY`.
servers:
  - url: https://api.spidra.io/api
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /template-runs/{runId}:
    get:
      tags:
        - Templates
      summary: Get a Template Run
      description: A run's status and, once it has finished, its rows.
      parameters:
        - name: runId
          in: path
          required: true
          schema:
            type: string
          description: The run's ID.
        - name: rows
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: Set to `false` to leave the rows out (faster while polling).
      responses:
        '200':
          description: The run.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  run:
                    $ref: '#/components/schemas/TemplateRun'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No run with this ID on your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TemplateRun:
      type: object
      properties:
        runId:
          type: string
        template:
          type: string
          description: The template's slug.
        templateVersion:
          type: integer
        presetId:
          type:
            - string
            - 'null'
          description: Set when the run came from a preset.
        tool:
          type: string
        status:
          type: string
          enum:
            - running
            - completed
            - partial
            - failed
            - cancelled
          description: >-
            `partial`: some pages failed (they aren't charged) and the rest came
            back.
        inputs:
          type: object
          description: The inputs the run used, with defaults filled in.
        createdAt:
          type: string
          format: date-time
        finishedAt:
          type:
            - string
            - 'null'
          format: date-time
        creditsUsed:
          type:
            - number
            - 'null'
          description: Null while running.
        urlCount:
          type:
            - integer
            - 'null'
          description: Pages the run reads.
        rowCount:
          type:
            - integer
            - 'null'
        progress:
          type: object
          properties:
            completed:
              type: integer
            failed:
              type: integer
            total:
              type: integer
        rows:
          type: array
          items:
            type: object
            additionalProperties: true
          description: >-
            The results, one object per row, with every field the site returned.
            Present once the run has finished (leave out with `?rows=false`).
        failures:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              error:
                type: string
          description: Pages that couldn't be read. Not charged.
        error:
          type: string
          description: Why the run failed.
        followStep:
          type: object
          description: >-
            Templates with a second step switched on (such as finding emails and
            social links on each business's website).
          properties:
            status:
              type: string
              enum:
                - waiting
                - running
                - completed
                - failed
            sites:
              type: integer
            pagesLoaded:
              type: integer
            pagesFailed:
              type: integer
            pagesWaiting:
              type: integer
            creditsUsed:
              type: number
            error:
              type: string
        summary:
          type: object
          description: >-
            Rank trackers only: how many keywords or points ranked, and the
            average position.
        job:
          type: object
          properties:
            tool:
              type: string
            id:
              type:
                - string
                - 'null'
          description: The tool job behind the run, for that tool's own endpoints.
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
      required:
        - status
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.