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

# UI Script (input_schema.json)

`input_schema.json` is the **“face” of a script**. By modifying this file, you can control **what parameters users need to fill in before running the script** (such as URLs, keywords, dates, etc.), and **how these inputs are presented** (dropdowns, checkboxes, text fields, and more).

***

## **1. Overall Structure**

A standard configuration file consists of the following three parts:

1. **description**: Introduces the purpose and usage of the script to users.
2. **b (Concurrency Key Field)**: Determines how the script splits tasks.
3. **properties**: The list of configurable parameters.

***

## **💡 Example**

```json theme={null}
{
  "description": "Our Instagram post comment scraper extracts commenter username, URL, comment date, content, like/reply counts, replies, hashtags, comment ID, post ID, original poster and post URL. Results are downloadable in structured formats.",
  "b": "post_url",
  "properties": [
    {
      "title": "Post URL",
      "name": "post_url",
      "type": "array",
      "editor": "requestList",
      "description": "This parameter is used to specify the Instagram post URL to be fetched.",
      "default": [
        {
        	"url": "https://www.instagram.com/cats_of_instagram/reel/C4GLo_eLO2e/"
   		 },
    	{
        	"url": "https://www.instagram.com/catsofinstagram/p/CesFC7JLyFl/?img_index=1"
   		 }
      ],
      "required": true
    }
  ]
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-57.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=7d4751cfa6bca4743b50414ddcfb8e99" alt="Image" width="1766" height="908" data-path="images/image-57.png" />

***

## **2. Root Field Descriptions**

| Field Name      | Required | Description                                                                                                                                            |
| :-------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **description** | No       | **Tool description**. Displayed at the top of the page. Used to explain the script’s purpose, usage notes, and limitations.                            |
| **b**           | **Yes**  | **Task split key**. Must match the `name` of one property. The script will run concurrently based on this field (e.g., split tasks by number of URLs). |
| **properties**  | **Yes**  | **Parameter configuration list**. Each element represents an input field or selector on the UI.                                                        |

***

## ****`3. Parameter Properties (Inside properties)`****

Each parameter item can include the following attributes:

* **title**: Label shown on the UI (e.g., “Search Keywords”).
* **name**: Internal identifier, **must be unique** and **must not contain Chinese characters**.
* **type**: Data type:
  * `string`: Text
  * `integer`: Number
  * `boolean`: Boolean (true / false)
  * `array`: List / multiple values
  * `object`: Object
* **editor**: Determines how the input is rendered in the UI (see below).
* **description**: Helper text shown below the input field.
* **default**: Default value shown initially.
* **required**: If set to `true`, the script cannot run unless this field is filled.

***

## **4. Editor Type Guide**

Choose different editors to optimize user experience.

***

### **4.1 Basic Text & Numbers**

| Editor       | UI Display             | Use Case                                       |
| :----------- | :--------------------- | :--------------------------------------------- |
| **input**    | Single-line text field | Short text, keywords, usernames, etc.          |
| **textarea** | Multi-line text field  | Long-form text input.                          |
| **number**   | Numeric input          | Only allows numeric values with range control. |

***

### **4.2 Selectors**

| Editor       | UI Display    | Description                             |
| :----------- | :------------ | :-------------------------------------- |
| **select**   | Dropdown      | Ideal for many predefined options.      |
| **radio**    | Radio buttons | Single selection from multiple options. |
| **checkbox** | Checkboxes    | Multiple selections allowed.            |
| **switch**   | Toggle switch | Used for on/off states.                 |

***

### **4.3 Date & Special Lists**

| Editor                | UI Display               | Description                                   |
| :-------------------- | :----------------------- | :-------------------------------------------- |
| **datepicker**        | Date picker              | Select or input dates.                        |
| **requestList**       | URL list                 | Batch input and management of target URLs.    |
| **requestListSource** | URL list with parameters | Extends `requestList` with custom parameters. |
| **stringList**        | String list              | Batch input for keywords or similar data.     |

***

## **5. Common Component Examples**

### **5.1 Single-line Input**

```json theme={null}
{
  "title": "Location (use only one location per run)",
  "name": "location",
  "type": "string",
  "editor": "input",
  "default": "New York, USA"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-58.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=427bddc2623e7f29a1322994b849c8d7" alt="Image" width="1401" height="169" data-path="images/image-58.png" />

***

### **5.2 Multi-line Textarea**

```json theme={null}
{
  "title": "Filter reviews by keywords",
  "name": "keywords",
  "type": "string",
  "editor": "textarea"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-59.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=2cf9a4ed53479bd3378ea521438eab84" alt="Image" width="1395" height="287" data-path="images/image-59.png" />

***

### **5.3 Number Input**

```json theme={null}
{
  "title": "Number of places to extract (per each search term or URL)",
  "name": "maxPlacesPerSearch",
  "type": "integer",
  "editor": "number",
  "default": 4
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-60.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=51e48593fd41d91193b13ae6d2112cd8" alt="Image" width="1396" height="153" data-path="images/image-60.png" />

***

### **5.4 Dropdown Select**

```json theme={null}
{
  "title": "Language",
  "name": "language",
  "type": "string",
  "editor": "select",
  "options": [
    { "label": "English", "value": "en" },
    { "label": "Afrikaans", "value": "af" },
    { "label": "azərbaycan", "value": "az" }
  ],
  "default": "en"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-61.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=b3e024d35ef5d8b2a9afa92a34fbfcba" alt="Image" width="1387" height="290" data-path="images/image-61.png" />

***

### **5.5 Radio Buttons**

```json theme={null}
{
  "title": "Category",
  "name": "radio",
  "type": "integer",
  "editor": "radio",
  "options": [
    { "label": "hotel", "value": 1 },
    { "label": "restaurant", "value": 2 }
  ],
  "default": 1
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-62.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=413eb074b6af2397b258ca28a825b942" alt="Image" width="569" height="143" data-path="images/image-62.png" />

***

### **5.6 Checkboxes**

```json theme={null}
{
  "title": "Data Sections to Scrape",
  "name": "data_sections",
  "type": "array",
  "editor": "checkbox",
  "options": [
    { "label": "Reviews", "value": "reviews" },
    { "label": "Address", "value": "address" },
    { "label": "Phone Number", "value": "phone_number" }
  ],
  "default": ["reviews", "address"]
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-63.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=f171c16d3ce2b5ab4060a614f6b8606d" alt="Image" width="634" height="146" data-path="images/image-63.png" />

***

### **5.7 Date Picker**

```json theme={null}
{
  "title": "Extract posts that are newer than",
  "name": "date",
  "type": "string",
  "editor": "datepicker",
  "format": "DD/MM/YYYY",
  "valueFormat": "DD/MM/YYYY"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/OpoF_MRzMHVp3fLl/images/image-64.png?fit=max&auto=format&n=OpoF_MRzMHVp3fLl&q=85&s=f66572e0ea1959c5c1ca63b2f4247275" alt="Image" width="698" height="152" data-path="images/image-64.png" />

```json theme={null}
{
  "title": "Extract posts that are newer than",
  "name": "date",
  "type": "string",
  "editor": "datepicker",
  "dateType": "absoluteOrRelative"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/9K5h6KheCN-df18l/images/image-65.png?fit=max&auto=format&n=9K5h6KheCN-df18l&q=85&s=8764694f92ea5214b385911cd886d708" alt="Image" width="1382" height="278" data-path="images/image-65.png" />

<img src="https://mintcdn.com/cafescraper-61ea57db/9K5h6KheCN-df18l/images/image-66.png?fit=max&auto=format&n=9K5h6KheCN-df18l&q=85&s=4dc09a8a1869843901c47a6689d0f56d" alt="Image" width="1385" height="289" data-path="images/image-66.png" />

***

### **5.8 Switch**

```json theme={null}
{
  "title": "⏩ Skip closed places",
  "name": "skipClosed",
  "type": "boolean",
  "editor": "switch"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/9K5h6KheCN-df18l/images/image-67.png?fit=max&auto=format&n=9K5h6KheCN-df18l&q=85&s=30fa8f3e76b97f7623c7a61b2af48877" alt="Image" width="335" height="128" data-path="images/image-67.png" />

***

### **5.9 URL List (requestList)**

```json theme={null}
{
  "name": "startURLs",
  "type": "array",
  "title": "Start URLs",
  "editor": "requestList",
  "required": true,
  "description": "The URLs of the website to scrape"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/9K5h6KheCN-df18l/images/image-68.png?fit=max&auto=format&n=9K5h6KheCN-df18l&q=85&s=13b33914de953623e173f8b75fb19b55" alt="Image" width="1389" height="336" data-path="images/image-68.png" />

***

### **5.10 URL List Source (requestListSource)**

```json theme={null}
{
    "title": "startURLs",
    "name": "url",
    "type": "array",
    "editor": "requestListSource",
    "default": [
        {
            "url": "https://www.instagram.com/espn",
            "end_date": "",
            "start_date": "",
            "num_of_posts": "10",
            "posts_to_not_include": ""
        }
    ],
    "param_list": [
        {
            "param": "url",
            "title": "URL",
            "editor": "input",
            "type": "string",
            "required": true,
            "description": "This parameter is used to specify the Instagram access URL to be fetched."
        },
        {
            "param": "num_of_posts",
            "title": "Maximum Number of Reels",
            "type": "integer",
            "editor": "number",
            "description": "This parameter is used to specify the maximum number of Reels to fetch."
        },
        {
            "param": "start_date",
            "title": "Start Date",
            "type": "string",
            "editor": "datepicker",
            "format": "MM-DD-YYYY",
            "valueFormat": "MM-DD-YYYY",
            "description": "This parameter is used to specify the start time of the post, format: mm-dd-yyyy, and should be earlier than the \"end_date\"."
        },
        {
            "param": "end_date",
            "title": "End Date",
            "type": "string",
            "editor": "datepicker",
            "format": "MM-DD-YYYY",
            "valueFormat": "MM-DD-YYYY",
            "description": "This parameter is used to specify the end time of the post, format: mm-dd-yyyy, and should be later than the \"start_date\"."
        }
    ],
    "description": "The URLs of the website to scrape"
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/9K5h6KheCN-df18l/images/image-69.png?fit=max&auto=format&n=9K5h6KheCN-df18l&q=85&s=93987c5148cbc988832f62b6583b0ea1" alt="Image" width="2048" height="300" data-path="images/image-69.png" />

***

### **5.11 String List**

```json theme={null}
{
  "title": "Search term(s)",
  "name": "searchTerms",
  "type": "array",
  "editor": "stringList",
  "default": [
    { "string": "restaurant" },
    { "string": "school" }
  ]
}
```

<img src="https://mintcdn.com/cafescraper-61ea57db/bNkyD-ZP4-4kSgxs/images/24832302876_211201030865_dfd4d22f2d116a1917d333058ccdc33d-1.png?fit=max&auto=format&n=bNkyD-ZP4-4kSgxs&q=85&s=dcec9d305e325c0b7f9ea77b3c8e30bd" alt="24832302876 211201030865 Dfd4d22f2d116a1917d333058ccdc33d" width="1067" height="342" data-path="images/24832302876_211201030865_dfd4d22f2d116a1917d333058ccdc33d-1.png" />

***

## **💡 Configuration Tips**

1. **Write clear descriptions**

   A well-written `description` improves discoverability and usability.
2. **Provide sensible defaults**

   Good defaults allow users to run the script with minimal effort.
3. **Enforce required fields**

   For critical parameters (e.g., login cookies or start URLs), always set `"required": true`.
