# Extract Data From Both Listing and Detail Pages

### Step 1: Create a Workflow

Open the pline extension and click **"Build Workflow."**

<figure><img src="/files/0Qu78sBqnkRuyL29W8IC" alt=""><figcaption></figcaption></figure>

### Step 2: Select Page Type

Webpages can appear as **Vertical, Grid, or Horizontal Layouts.**&#x20;

* Select the layout that matches the Amazon results page (i.e., Grid Layout).

<figure><img src="/files/kKrBbuBUBuBZFGVDG0MJ" alt=""><figcaption></figcaption></figure>

### Step 3: AI-Driven Field Detection

Pline uses AI to automatically detect and group similar items on the page and **preselect relevant fields**. If the grouping looks correct, click **“Yes, Looks good.”**

<figure><img src="/files/swC8ooAhMHxhlhd2cSuI" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If not, select the next group. You can **add, edit, or remove fields** as needed before proceeding.
{% endhint %}

<figure><img src="/files/3JqzwFWw6pFDtc9HEhEy" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure you extract fields from the product URL or link that will direct to the detail page.
{% endhint %}

### Step 4: Select Pagination Type

Select the appropriate pagination type, then locate it on the page and tag it.

<figure><img src="/files/0NRD5ejtT6vNOdFPDngY" alt=""><figcaption></figcaption></figure>

### Step 5: Select Fields to Extract

* Select the field with the detail page link, click **“Select fields from the detail page,”** and Pline will direct you there automatically.

<figure><img src="/files/Pom5oufgXLbvNBXOMCCS" alt=""><figcaption></figcaption></figure>

* Click on the data you want to extract, enter a field name, save it, and repeat for all required fields.

<figure><img src="/files/Zc9SVJ5Gst0D5DqTVfM3" alt=""><figcaption></figcaption></figure>

* You can easily add, edit, or remove fields based on the data you need.

<figure><img src="/files/0cayLR3S8nDj0uMZL4Dd" alt=""><figcaption></figcaption></figure>

* Preview the sample data from both the listing page and the detail pages.

<figure><img src="/files/n351d8CZPTfhAYB6Q8wJ" alt=""><figcaption></figcaption></figure>

### Step 6: Run the Workflow

Enter a workflow name and click **"Save & Run"** to start the extraction.

<figure><img src="/files/dt59FyprvlgvAm7yaiw1" alt=""><figcaption></figcaption></figure>

#### Step 7: Access Your Data

* Stop the extraction once you’re done.

<figure><img src="/files/4dA4FojmXMz5hP6knga6" alt=""><figcaption></figcaption></figure>

* Download the data in CSV or explore it further on Pline’s Platform.

<figure><img src="/files/eB6FA8wmcvTSOFSvc35M" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pline.ai/getting-started/extract-data-from-both-listing-and-detail-pages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
