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

# Post base scrapetrigger

> Trigger a web scrape job and return a snapshot ID for polling

Required token scopes: `base|read`



## OpenAPI

````yaml /swagger.json post /base/{baseId}/scrape/trigger
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /base/{baseId}/scrape/trigger:
    post:
      tags:
        - scrape
      description: |-
        Trigger a web scrape job and return a snapshot ID for polling

        Required token scopes: `base|read`
      parameters:
        - schema:
            type: string
          required: true
          name: baseId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                datasetId:
                  type: string
                  description: >-
                    Catalog dataset id (e.g. linkedin_person_profile) or a raw
                    scraper id (gd_...) found via dataset search
                inputs:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                        - type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                  description: >-
                    Array of input objects for the dataset (e.g. [{ url: "..."
                    }, { url: "..." }]). Each object represents one item to
                    scrape; values keep their JSON type.
                discoverBy:
                  type: string
                  minLength: 1
                  description: >-
                    Discover mode of a raw gd_ dataset id, as dataset search
                    lists it under modes: records are found from the inputs
                    (keyword, profile URL...) instead of collected from URLs.
                    Catalog ids carry their own mode.
                limit:
                  type: integer
                  minimum: 1
                  maximum: 50
                  description: >-
                    Records returned per input (a feed, search or comment list),
                    default 10; a single page still yields one record
              required:
                - datasetId
                - inputs
      responses:
        '201':
          description: Scrape triggered, returns snapshot ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  snapshotId:
                    type: string
                required:
                  - snapshotId
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/base/%7BbaseId%7D/scrape/trigger \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"datasetId":"string","inputs":[{"property1":"string","property2":"string"}],"discoverBy":"string","limit":1}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/base/%7BbaseId%7D/scrape/trigger';

            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"datasetId":"string","inputs":[{"property1":"string","property2":"string"}],"discoverBy":"string","limit":1}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/base/%7BbaseId%7D/scrape/trigger',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              datasetId: 'string',
              inputs: [{property1: 'string', property2: 'string'}],
              discoverBy: 'string',
              limit: 1
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"datasetId\":\"string\",\"inputs\":[{\"property1\":\"string\",\"property2\":\"string\"}],\"discoverBy\":\"string\",\"limit\":1}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/base/%7BbaseId%7D/scrape/trigger",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````