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

# Create a job

> Starts a scrape: `scraper_type` picks the scraper and `config` (or its alias `input`) holds its input. The job is billed when it completes, at the price locked here. Follow it with `GET /api/v1/jobs/{id}/` or a webhook until it reaches a terminal status.



## OpenAPI

````yaml /openapi.json post /api/v1/jobs/create/
openapi: 3.0.3
info:
  title: Go-Fetch API
  version: v1
servers:
  - url: https://go-fetch.io
security: []
tags:
  - name: Jobs
    description: >-
      A job is one scrape. Create it with a scraper type and its input, follow
      it until it is completed, failed, timed_out or cancelled, then page
      through its results.
  - name: Webhooks
    description: >-
      URLs we POST to when a job finishes, signed with your webhook secret in
      the X-Webhook-Signature header, and the log of every delivery.
  - name: Usage
    description: Billable usage, one record per charge.
  - name: Pricing
    description: List prices per platform and a cost estimate. No API key needed.
  - name: API keys
    description: >-
      Your organization's API keys. Creating, changing and rotating a key needs
      a key with the admin scope.
  - name: Organizations
    description: >-
      The organization your key belongs to: its environments, members, this
      month's usage and the audit log.
paths:
  /api/v1/jobs/create/:
    post:
      tags:
        - Jobs
      summary: Create a job
      description: >-
        Starts a scrape: `scraper_type` picks the scraper and `config` (or its
        alias `input`) holds its input. The job is billed when it completes, at
        the price locked here. Follow it with `GET /api/v1/jobs/{id}/` or a
        webhook until it reaches a terminal status.
      operationId: jobs_create_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScraperJobCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ScraperJobCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ScraperJobCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScraperJob'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ScraperJobCreateRequest:
      type: object
      properties:
        scraper_type:
          $ref: '#/components/schemas/ScraperJobCreateScraperTypeEnum'
        config: {}
        input: {}
        organization:
          type: string
          format: uuid
        timeout:
          type: integer
          default: 28800
          description: Job timeout in seconds (min 5 min, max 11 hours). Default 8 hours.
        webhooks:
          type: array
          items:
            $ref: '#/components/schemas/AdHocWebhookRequest'
      required:
        - scraper_type
    ScraperJob:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        organization:
          type: string
          format: uuid
        organization_name:
          type: string
          readOnly: true
        environment:
          type: string
          format: uuid
          readOnly: true
        environment_name:
          type: string
          readOnly: true
        scraper_type:
          type: string
        config:
          description: Scraper configuration/input parameters
        status:
          allOf:
            - $ref: '#/components/schemas/ScraperJobStatusEnum'
          readOnly: true
        is_terminal:
          type: boolean
          readOnly: true
        will_auto_retry:
          type: boolean
          readOnly: true
        items_scraped:
          type: integer
          readOnly: true
        output_dataset_url:
          type: string
          format: uri-reference
          readOnly: true
          description: >-
            The job's results endpoint, a relative path served with your API
            key. Empty until the job completes.
        error_message:
          type: string
          readOnly: true
        error_code:
          nullable: true
          description: >-
            Why the job did not complete; null unless it failed, timed out or
            was cancelled.


            * `CANCELLED` - CANCELLED

            * `TIMEOUT` - TIMEOUT

            * `PLATFORM_ERROR` - PLATFORM_ERROR

            * `PROFILE_EXCLUDED` - PROFILE_EXCLUDED

            * `INPUT_ERROR` - INPUT_ERROR

            * `INFRA_TERMINATED` - INFRA_TERMINATED

            * `RATE_LIMITED` - RATE_LIMITED

            * `BLOCKED` - BLOCKED

            * `UNKNOWN` - UNKNOWN
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/ErrorCodeEnum'
            - $ref: '#/components/schemas/NullEnum'
        error_description:
          type: string
          readOnly: true
          description: >-
            Why the job ended, in words for a person: what happened and what to
            do next. Empty when `error_message` is. Show this one;
            `error_message` is the scraper's own technical text.
        attempt_history:
          type: array
          items:
            $ref: '#/components/schemas/Attempt'
          readOnly: true
        started_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        completed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        duration_seconds:
          type: integer
          readOnly: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        retry_count:
          type: integer
          readOnly: true
          description: Number of times this job has been retried
        max_retries:
          type: integer
          description: Maximum number of retries allowed for this job
        can_retry:
          type: boolean
          readOnly: true
        can_resume:
          type: boolean
          description: Whether the job can resume from partial state
        partial_results_count:
          type: integer
          readOnly: true
          description: Items stored so far while the job runs.
        last_progress_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: Last time progress was reported by the scraper
        ad_hoc_webhooks:
          type: array
          nullable: true
          items:
            type: object
            required:
              - url
              - events
            properties:
              url:
                type: string
                format: uri
              events:
                type: array
                items:
                  type: string
              signing_secret:
                type: string
                description: In full in the create response only, `****` after.
          description: The per-run webhooks sent with the create request.
          readOnly: true
        scraper_metadata:
          type: object
          nullable: true
          additionalProperties: {}
          description: >-
            What the scraper reported about how complete the collection is, when
            it reported anything: for example coverage, restrictions,
            targets_failed and dataAsOf. The keys vary by scraper type.
          readOnly: true
        started_from:
          type: string
          format: date
          readOnly: true
          nullable: true
          description: Scrape posts newer than this date. NULL = all-time / initial crawl.
        is_initial_crawl:
          type: boolean
          readOnly: true
          description: >-
            True if this is a deep historical scrape; False for date-bounded
            regular crawls.
        price_per_1000_at_creation:
          type: string
          format: decimal
          pattern: ^-?\d{0,6}(?:\.\d{0,4})?$
          readOnly: true
          nullable: true
          description: >-
            Price per 1,000 items at job creation (USD) - locked for historical
            reporting
        platform_prices_at_creation:
          readOnly: true
          nullable: true
          description: >-
            Rates per 1,000 rows by platform, locked at creation, for scraper
            types billed per platform; null when the job bills at
            `price_per_1000_at_creation`.
        minimum_charge_at_creation:
          type: boolean
          readOnly: true
          nullable: true
          description: >-
            Whether this job's scraper type has a minimum charge per job that
            returned results.
        estimated_cost:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,4})?$
          readOnly: true
          nullable: true
          description: >-
            The estimate the credit check used when the job was created (USD):
            estimated items × the locked rate. Not a forecast; see
            `actual_cost`.
        actual_cost:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,4})?$
          readOnly: true
          nullable: true
          description: Actual cost based on items_scraped (USD) - set on completion
        credits_deducted:
          type: boolean
          readOnly: true
          description: Whether credits have been deducted for this job
      required:
        - actual_cost
        - ad_hoc_webhooks
        - attempt_history
        - can_retry
        - completed_at
        - created_at
        - credits_deducted
        - duration_seconds
        - environment
        - environment_name
        - error_code
        - error_description
        - error_message
        - estimated_cost
        - id
        - is_initial_crawl
        - is_terminal
        - items_scraped
        - last_progress_at
        - minimum_charge_at_creation
        - organization
        - organization_name
        - output_dataset_url
        - partial_results_count
        - platform_prices_at_creation
        - price_per_1000_at_creation
        - retry_count
        - scraper_metadata
        - scraper_type
        - started_at
        - started_from
        - status
        - updated_at
        - will_auto_retry
    ScraperJobCreateScraperTypeEnum:
      enum:
        - instagram
        - instagram_profile
        - instagram_posts
        - instagram_comments
        - youtube
        - tiktok
        - tiktok_comments
        - facebook
        - facebook_posts
        - facebook_profile
        - google_serp
        - tiktok_search
        - tiktok_profile
      type: string
      description: |-
        * `instagram` - instagram
        * `instagram_profile` - instagram_profile
        * `instagram_posts` - instagram_posts
        * `instagram_comments` - instagram_comments
        * `youtube` - youtube
        * `tiktok` - tiktok
        * `tiktok_comments` - tiktok_comments
        * `facebook` - facebook
        * `facebook_posts` - facebook_posts
        * `facebook_profile` - facebook_profile
        * `google_serp` - google_serp
        * `tiktok_search` - tiktok_search
        * `tiktok_profile` - tiktok_profile
    AdHocWebhookRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          minLength: 1
        events:
          type: array
          items:
            type: string
            minLength: 1
      required:
        - events
        - url
    ScraperJobStatusEnum:
      enum:
        - pending
        - running
        - completed
        - failed
        - timed_out
        - cancelled
      type: string
      description: |-
        * `pending` - Pending
        * `running` - Running
        * `completed` - Completed
        * `failed` - Failed
        * `timed_out` - Timed Out
        * `cancelled` - Cancelled
    ErrorCodeEnum:
      enum:
        - CANCELLED
        - TIMEOUT
        - PLATFORM_ERROR
        - PROFILE_EXCLUDED
        - INPUT_ERROR
        - INFRA_TERMINATED
        - RATE_LIMITED
        - BLOCKED
        - UNKNOWN
      type: string
      description: |-
        * `CANCELLED` - CANCELLED
        * `TIMEOUT` - TIMEOUT
        * `PLATFORM_ERROR` - PLATFORM_ERROR
        * `PROFILE_EXCLUDED` - PROFILE_EXCLUDED
        * `INPUT_ERROR` - INPUT_ERROR
        * `INFRA_TERMINATED` - INFRA_TERMINATED
        * `RATE_LIMITED` - RATE_LIMITED
        * `BLOCKED` - BLOCKED
        * `UNKNOWN` - UNKNOWN
    NullEnum:
      enum:
        - null
    Attempt:
      type: object
      properties:
        attempt:
          type: integer
          description: Which dispatch of the job this attempt was.
        status:
          type: string
          description: The status the attempt ended in.
        error_message:
          type: string
        failed_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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