---
title: "Create or update a product scraper configuration"
method: PUT
path: "/api/v1/products/{productId}/scraper"
tags: ["Content"]
---

# Create or update a product scraper configuration

`PUT /api/v1/products/{productId}/scraper`

## Request

- Base URL: `https://app.promptingco.com`
- URL: `https://app.promptingco.com/api/v1/products/{productId}/scraper`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in cookie `better-auth.session_token`

## Path parameters

- `productId` string, required

## Request body

- object
  - `startUrls` string[], required
  - `baseUrls` string[], required
  - `cssSelector` string
  - `cssExcludeSelector` string, nullable
  - `customHeaders` object
  - `frequencyType` 'weekly' | 'monthly'
  - `frequencyCount` integer
  - `pollingPaused` boolean

## Response `200`

Successful response

- object
  - `ok` true, required
  - `data` object, required
    - `scraper` object, nullable, required
      - `id` string, required
      - `productId` string, required
      - `startUrls` string[], required
      - `baseUrls` string[], required
      - `cssSelector` string, nullable, required
      - `cssExcludeSelector` string, nullable, required
      - `customHeaders` object, required
      - `frequencyType` string, required
      - `frequencyCount` integer, required
      - `pollingPaused` boolean, required
      - `lastRunAt` string, nullable, required
      - `nextRunAt` string, nullable, required
      - `createdAt` string, required
      - `updatedAt` string, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `404`: Not found
- `422`: Validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api.md) - [All operations](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptingcompany/apis/the-prompting-company-api/revisions/c0451ea10e9a?raw)
