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

# Get job status

> Poll the status of an async scrape job. No authentication required - the job_id is an unguessable UUID. Returns the full result when done.

<Info>
  **No authentication required**

  The `job_id` is an unguessable UUID v4 - no API key needed to poll job status.
</Info>

## Status values

| Status    | Description                                             |
| --------- | ------------------------------------------------------- |
| `pending` | Job is queued - the scrape has not completed yet        |
| `done`    | Scrape succeeded - `result` contains the full response  |
| `failed`  | All retry attempts failed - `error` contains the reason |

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.scrapellm.com/jobs/3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c"
  ```

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

  job_id = "3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c"

  while True:
      job = requests.get(
          f"https://api.scrapellm.com/jobs/{job_id}"
      ).json()

      if job["status"] == "done":
          print(job["result"])
          break
      if job["status"] == "failed":
          print("Scrape failed:", job.get("error"))
          break

      time.sleep(3)
  ```

  ```javascript JavaScript theme={null}
  const jobId = "3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c";

  async function waitForJob(jobId) {
    while (true) {
      const resp = await fetch(`https://api.scrapellm.com/jobs/${jobId}`);
      const job = await resp.json();

      if (job.status === "done") return job.result;
      if (job.status === "failed") throw new Error(job.error);

      await new Promise(r => setTimeout(r, 3000));
    }
  }

  const result = await waitForJob(jobId);
  console.log(result);
  ```
</CodeGroup>

## Response

### Pending

```json theme={null}
{
  "job_id": "3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c",
  "status": "pending",
  "scraper": "chatgpt",
  "prompt": "What brands do marketers recommend for email automation?",
  "country": "US",
  "created_at": "2026-05-11T12:00:00+00:00"
}
```

### Done

```json theme={null}
{
  "job_id": "3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c",
  "status": "done",
  "scraper": "chatgpt",
  "prompt": "What brands do marketers recommend for email automation?",
  "country": "US",
  "result": {
    "scraper": "chatgpt",
    "status": "done",
    "result": "Marketers commonly recommend Mailchimp, HubSpot, and Klaviyo...",
    "links": [...],
    "search_queries": [...],
    "credits_used": 3,
    "elapsed_ms": 8243.5,
    "cached": false
  },
  "created_at": "2026-05-11T12:00:00+00:00",
  "completed_at": "2026-05-11T12:00:18+00:00"
}
```

### Failed

```json theme={null}
{
  "job_id": "3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c",
  "status": "failed",
  "scraper": "chatgpt",
  "error": "execution failed",
  "created_at": "2026-05-11T12:00:00+00:00",
  "completed_at": "2026-05-11T12:01:45+00:00"
}
```

## Response fields

<ResponseField name="job_id" type="string">
  The unique job identifier.
</ResponseField>

<ResponseField name="status" type="string">
  Current state: `pending`, `done`, or `failed`.
</ResponseField>

<ResponseField name="scraper" type="string">
  The scraper that processed this job.
</ResponseField>

<ResponseField name="result" type="object">
  Full scrape response. Present only when `status` is `"done"`. Schema matches the sync endpoint response for the same scraper.
</ResponseField>

<ResponseField name="error" type="string">
  Error message. Present only when `status` is `"failed"`.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 UTC timestamp when the job was submitted.
</ResponseField>

<ResponseField name="completed_at" type="string">
  ISO 8601 UTC timestamp when the job finished (done or failed). Null while pending.
</ResponseField>

## Job retention

Jobs are retained for **24 hours** after creation. After that, the job ID returns `HTTP 404`.

## Error codes

| Status | Meaning                                                   |
| ------ | --------------------------------------------------------- |
| `404`  | Job not found or expired (jobs are retained for 24 hours) |


## OpenAPI

````yaml GET /jobs/{job_id}
openapi: 3.1.0
info:
  title: ScrapeLLM — ChatGPT Scraper
  version: 1.1.0
  description: >
    Scrape the real ChatGPT web interface via ScrapeLLM's browser pool. Returns
    the full

    response — including cited web sources and query fan-out — as structured
    JSON.


    **Base URL:** `https://api.scrapellm.com`


    **Credits:** 3 per request · 1,500 free credits · No credit card required


    Get your API key at [scrapellm.com/signup](https://scrapellm.com/signup).


    ## Sync vs Async


    | Mode | Endpoint | When to use |

    |------|----------|-------------|

    | **Sync** | `GET /scrapers/chatgpt` | Simple integrations — blocks until
    the scrape completes |

    | **Async** | `POST /scrapers/chatgpt/jobs` | Batch workloads, background
    workers, or when you don't want to hold an open connection |


    Async jobs are retained for **24 hours**. Failed scrapes are automatically
    retried up to

    3 times before the job is marked `failed`.
  contact:
    email: hello@scrapellm.com
    url: https://scrapellm.com
  license:
    name: ScrapeLLM Terms of Service
    url: https://scrapellm.com/terms
servers:
  - url: https://api.scrapellm.com
    description: Production
security:
  - ApiKeyHeader: []
  - ApiKeyQuery: []
tags:
  - name: ChatGPT Scraper
    description: Submit prompts to ChatGPT and receive structured responses.
  - name: Jobs
    description: >-
      Poll the status of async scrape jobs. No authentication required — the
      `job_id` is an unguessable UUID.
paths:
  /jobs/{job_id}:
    get:
      tags:
        - Jobs
      summary: Get async job status
      description: >
        Poll the status of an async scrape job submitted via `POST
        /scrapers/chatgpt/jobs`.


        Returns the full scrape result once the job is complete. **No
        authentication

        required** — the `job_id` is an unguessable UUID v4.


        **Status values**

        - `pending` — job is queued, the scrape has not completed yet

        - `done` — scrape succeeded; `result` contains the full response

        - `failed` — all retry attempts failed; `error` contains the reason


        Jobs are retained for **24 hours** after creation.
      operationId: getJob
      parameters:
        - name: job_id
          in: path
          required: true
          description: The UUID returned by `POST /scrapers/chatgpt/jobs`.
          schema:
            type: string
            format: uuid
          example: 3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c
      responses:
        '200':
          description: Job found. Check the `status` field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncJobStatus'
              examples:
                pending:
                  summary: Job still running
                  value:
                    job_id: 3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c
                    status: pending
                    scraper: chatgpt
                    prompt: What brands do marketers recommend for email automation?
                    country: US
                    created_at: '2026-05-11T12:00:00+00:00'
                done:
                  summary: Job completed successfully
                  value:
                    job_id: 3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c
                    status: done
                    scraper: chatgpt
                    prompt: What brands do marketers recommend for email automation?
                    country: US
                    result:
                      scraper: chatgpt
                      status: done
                      job_id: job_abc123
                      prompt: What brands do marketers recommend for email automation?
                      country: US
                      result: >-
                        Marketers commonly recommend Mailchimp, HubSpot, and
                        Klaviyo...
                      credits_used: 3
                      elapsed_ms: 8243.5
                      cached: false
                    created_at: '2026-05-11T12:00:00+00:00'
                    completed_at: '2026-05-11T12:00:18+00:00'
                failed:
                  summary: Job failed after all retries
                  value:
                    job_id: 3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c
                    status: failed
                    scraper: chatgpt
                    prompt: What brands do marketers recommend for email automation?
                    country: US
                    error: execution failed
                    created_at: '2026-05-11T12:00:00+00:00'
                    completed_at: '2026-05-11T12:01:45+00:00'
        '404':
          description: Job not found or expired (jobs are retained for 24 hours).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: >-
                  Job not found. It may have expired (jobs are retained for 24
                  hours) or the ID is invalid.
      security: []
components:
  schemas:
    AsyncJobStatus:
      type: object
      required:
        - job_id
        - status
        - scraper
        - prompt
        - country
        - created_at
      properties:
        job_id:
          type: string
          format: uuid
          description: The unique job identifier.
          example: 3f7a2b1c-9e4d-4f8a-b2c1-7d6e5f4a3b2c
        status:
          type: string
          description: Current state of the job.
          enum:
            - pending
            - done
            - failed
          example: done
        scraper:
          type: string
          description: The scraper that processed this job.
          example: chatgpt
        prompt:
          type: string
          description: The prompt that was submitted.
          example: What brands do marketers recommend for email automation?
        country:
          type: string
          description: The country the request was routed through.
          example: US
        result:
          description: >
            Full scrape response. Present only when `status` is `"done"`. Schema
            matches

            the response from `GET /scrapers/chatgpt`.
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ChatGPTScrapeResponse'
        error:
          type: string
          nullable: true
          description: Error message. Present only when `status` is `"failed"`.
          example: execution failed
        created_at:
          type: string
          format: date-time
          description: ISO 8601 UTC timestamp when the job was submitted.
          example: '2026-05-11T12:00:00+00:00'
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            ISO 8601 UTC timestamp when the job finished (done or failed). Null
            while pending.
          example: '2026-05-11T12:00:18+00:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Human-readable description of the error.
          example: Invalid API key.
    ChatGPTScrapeResponse:
      type: object
      required:
        - scraper
        - status
        - job_id
        - prompt
        - country
        - result
        - credits_used
        - elapsed_ms
        - cached
      properties:
        scraper:
          type: string
          description: Always `"chatgpt"`.
          example: chatgpt
        status:
          type: string
          description: '`"done"` on success.'
          example: done
        job_id:
          type: string
          description: Unique identifier for this scrape job.
          example: job_abc123
        prompt:
          type: string
          description: The prompt that was submitted.
          example: What brands do marketers recommend for email automation?
        country:
          type: string
          description: The country the request was routed through.
          example: US
        result:
          type: string
          description: Plain-text response from ChatGPT.
          example: Marketers commonly recommend Mailchimp, HubSpot, and Klaviyo...
        result_markdown:
          type: string
          nullable: true
          description: Markdown-formatted response from ChatGPT.
          example: >-
            Marketers commonly recommend **Mailchimp**, **HubSpot**, and
            **Klaviyo**...
        links:
          type: array
          description: Cited web sources with their display text and URL.
          items:
            $ref: '#/components/schemas/Link'
        search_queries:
          type: array
          description: >
            Internal search queries ChatGPT issued behind the scenes (query
            fan-out). These

            reveal what sub-questions ChatGPT searched to build its answer.
          items:
            type: string
          example:
            - best email automation tools marketers
            - top email marketing platforms 2025
        llm_model:
          type: string
          nullable: true
          description: ChatGPT model variant used (e.g. `gpt-4o`).
          example: gpt-4o
        credits_used:
          type: integer
          description: Credits consumed by this request. Always `3` for ChatGPT.
          example: 3
        elapsed_ms:
          type: number
          format: float
          description: Total end-to-end request duration in milliseconds.
          example: 8243.5
        cached:
          type: boolean
          description: '`true` if this response was served from cache.'
          example: false
        markdown_url:
          type: string
          nullable: true
          description: |
            Hosted `.md` URL for this response, suitable for sharing or linking.
            Expires after 24 hours.
          example: https://scrapellm.com/md/job_abc123.md
    Link:
      type: object
      required:
        - url
        - text
      properties:
        url:
          type: string
          format: uri
          description: Absolute URL of the cited source.
          example: https://mailchimp.com
        text:
          type: string
          description: Display text for the link as shown in ChatGPT's response.
          example: Mailchimp
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your ScrapeLLM API key passed in the request header.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Your ScrapeLLM API key passed as a query parameter.

````