Right Click to Call APIs

You can call APIs from your right-click menu using text that you highlight as an input parameter. This helps with quick lookups and calculations. For example:

  • Currency Conversion: right-click on a price to convert its currency
  • Language Translation: right-click on a word or sentence to translate it into another language
  • Data Lookup: right-click on a professional athlete or team to return stats, odds, schedules, etc.

For inspiration, check out RapidAPI which has 30K+ APIs that you can integrate with Bricks.

Here’s a tutorial to help you get started: Right-Click Currency Conversion (4 min)

3 Likes

Hi Pixie Brix team,

One thing I tend to do is grab a word and look up what it means. If this was added it can save users time from copy and pasting a word then searching online to define it.

I hope that helps and keep up the great work!
-Doug

3 Likes

Hi @Dshannon,

That’s a great use case that you can build today. Rather than hit an API, you could create a Right Click Action that searches your highlighted text in an online dictionary.

For example, go to Merriam-Webster and look up a word like “automation.” It returns the following URL: https://www.merriam-webster.com/dictionary/automation

In PixieBrix, we can add a Context Menu and express this URL in the “Open A Tab” brick like this: https://www.merriam-webster.com/dictionary/{{selectionText}}

The expression replaces “automation” with “{{selectionText}}” which represents any word you highlight.

Does that make sense?

Here’s how it would work:

Meriram-Webster

1 Like

Great!

Thanks, Mike ill see if I can’t add this to my Pixie Brix extension tonight!

Cheers,
-Doug