# Search Yelp Reviews from OpenTable

{% hint style="info" %}
🍎 Before you begin this tutorial, make sure you've completed the [Developer Quick Start Guide](/quick-start/mod-developer.md).
{% endhint %}

In this tutorial, we'll automate a simple process: searching for Yelp reviews of restaurants you're viewing in OpenTable, all with the click of a button.

### 0. Start here

Start by opening another tab for Elea's OpenTable listing: [Elea](https://www.opentable.com/r/elea-new-york). 👈 Click that. Keep that tab open, and then come back over here.

### 1. Place a Button

#### Open the Page Editor

Then, open the PixieBrix Page Editor on the OpenTable/Elea page, NOT this page.

{% hint style="info" %}
📘 Need help opening the Page Editor? Follow the steps here: [Open the Page Editor](/platform-overview/page-editor/open-the-page-editor.md)
{% endhint %}

#### Grant Access

The first time you open the Page Editor on a new webpage, you need to grant PixieBrix access to the page. You can grant permanent access by either:

* Clicking **Grant Permanent Access**, or
* Granting temporary access by clicking on the PixieBrix extension in the Chrome Extensions dropdown and then refreshing the page<br>

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

{% hint style="warning" %}
&#x20;🚨 If you had the Page Editor open before navigating to the Elea page, you'll need to close the Page Editor by clicking the X in the top right corner and then re-open it to provide access.
{% endhint %}

#### Place a Button

* Click **New Mod** in the top left of the Page Editor and choose **Button.**<br>

  <figure><img src="/files/Ck2a57aujbHccJGh4ZFO" alt=""><figcaption></figcaption></figure>
* Then hover your cursor over the **Overview** button in the OpenTable actions. **If it says `button`, move your mouse down a bit until it says `li` or `span`.**<br>

  <figure><img src="/files/D9WRWevY6Ew2rBGcnMzE" alt=""><figcaption></figcaption></figure>
* Click, and PixieBrix will add a new custom button called **Action** at the end of the button group<br>

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

*Don’t see it at the end, or it’s formatting weirdly? Go to the Location field that appears in the middle panel of your page editor, and click the box to the right of the mouse button. Replace the text with this `ol:has(> li:contains('Overview'))`*

#### Customize the Caption

To customize the caption, replace the word "Action" in the Caption text box field with "Yelp"<br>

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

### 2. Read the Data

We'll add the `Extra from Page` brick to select data from the page (even data not directly visible in the interface). Click the + button to add a brick.<br>

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

Search “extract from page” and select the brick that appears. **Search for Jquery Selector Reader if that doesn’t appear.**<br>

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

#### Select the Page Element

Next, we'll tell PixieBrix where to read the data on the page.

Click the **pointer icon** for the selector field to toggle the selection mode.<br>

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

Hover your mouse to the right of the restaurant name. When the purple overlay looks like the following, click to select the page element:<br>

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

#### Optional: Choose a More Robust Selector

By default, PixieBrix will choose a selector based on the page's structural layout. To ensure your selector works even if part of the OpenTable restaurant page layout changes, select the `#mainContent h1` suggestion from the "Selector" dropdown.

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

#### Rename the Property

Change the “Property” name to something more descriptive, like `restaurantName`<br>

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

#### Find the Property Path to Data

Let's double-check what data PixieBrix found. In the Data Panel to the right of the field, switch the "Preview" tab and expand the data. We'll see that `restaurantName` is “Elea” for this page, which makes sense.<br>

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

Click the copy icon next to `restaurantName` to copy its property path to your clipboard: `@data.restaurantName`

### 3. Perform an Action

Now that we've selected the data let's use it to perform a Yelp search.

#### Configure an Action

To add an action, click the **+ button** below the data brick we just added

In the brick selection modal, search for the "**Yelp search in new tab**" brick and choose it\
![](/files/Ixxg53n56PJULRyFGMZ3)

Configure the input using the data path we found in the Read Data step:\
![](/files/95Ks21PZ0l4TJ5hUJCHf)

### 4. Test Your Search

Press the Yelp button to test your search. Try it from different restaurant pages to see how the search dynamically changes. Once you're happy with the button, click **Save** to use this search in the future.

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

## Don’t want to build and just want to activate?

You’re in luck! Head to the marketplace to [activate this mod](https://www.pixiebrix.com/marketplace/cf3bf179-7137-41b5-8c67-7c56dabeb1bf/search-yelp-reviews-from-open-table/) and start using it immediately without building anything.

{% hint style="info" %}
&#x20;🙋 Need some help with building? [Head over to the Slack Community](https://slack.pixiebrix.com/), and we’ll gladly help you!
{% endhint %}


---

# 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.pixiebrix.com/tutorials/developer-tutorials/beginner/search-yelp-reviews-from-opentable.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.
