Bruno Geocoding Tutorial

Using Bruno to access the OpenCage geocoding API

Bruno is an open-source desktop client for interrogating APIs.

Our geocoding API is very straight-forward, with only a single entry point and authentication via the key parameter you supply as a variable in your request. Many APIs are more complex, and Bruno can be a useful tool for testing and debugging.

Nevertheless, as we know developers tend to have a preference to use the tools they are familiar with, we thought it might be helpful to publish a Bruno "collection" to make it as simple as possible for any developer who wants to access our API via this tool.

  1. Sign up for an OpenCage Geocoding API key, or if you already have one log in.
  2. Download and install the Bruno client from the Bruno website. Start the application

    OpenCage Bruno tutorial step 1
  3. Copy the OpenCage geocoding Insomnia collection, which you can find on GitHub, to your machine.

    Import the OpenCage collection into your Bruno client, being sure to select the type of the collection as "Insomnia Collection"

    OpenCage Bruno tutorial step 2

    You will be asked for the location of the directory in which Bruno will store this collection. Select your home directory or desktop or wherever else you would like to have it.
  4. Notice on the left hand side of the Bruno client you can now see a collection named "OpenCage Geocoder".

    OpenCage Bruno tutorial step 3

    Click on it and "OpenCage Reverse request" will appear. Click on that

  5. In the center of the application you can now see the request and click on the "Query" tab to see the various parameters.

    Notice that the key parameter uses a variable named OPENCAGE_API_KEY.

    OpenCage Bruno tutorial step 4

    Set the value of OPENCAGE_API_KEY to your OpenCage API key.

    You can also set this as a local

    secret in your Bruno environment, read the details in the Bruno documentation.
  6. Ok, now you're ready to start querying the OpenCage server. Run a query (press Cmd + Enter) and you should see a response from the OpenCage server

    OpenCage Bruno tutorial step 5

    Now you can change the parameter values or add some of the optional parameters we support.

  7. Happy geocoding!

Start your free trial

2,500 geocoding API requests per day.

No credit card required.