General proxy usage

API Code Generator

Generate ready-to-use code snippets for Geonode API requests.

The API Code Generator allows you to instantly create code snippets for different programming languages based on your configured proxy parameters.
This helps you test, integrate, and automate API calls quickly and efficiently.


Step 1: Configure Your Proxy

Before generating code, set up your proxy endpoint.

Follow the guide:
➡️ How to Use the Endpoint Generator to Configure a Proxy

This ensures you have the correct proxy details ready for code generation.


Step 2: Access the API Code Generator

Once your endpoint is created:

  1. Scroll down to the API Code Generator section in your dashboard.
  2. You will see code automatically generated based on your proxy configuration.
  3. The code is available in multiple programming languages, including:
    • Python
    • Node.js
    • Go
    • And others

Access the API Code Generator


Step 3: Copy and Paste the Code

  1. Choose your preferred language.
  2. Copy the generated code snippet.
  3. Paste it into your development environment or editor (e.g., VS Code, PyCharm, GoLand).

Step 4: Run the Code

Example: Running the Python code in VS Code.

If your snippet uses Python’s requests package, install it first:

pip install requests

Then run your file: python app.py


Step 5: Verify the Output

After running the script, check the console or terminal. The output should display the expected data from your API call, confirming that your proxy and code are properly configured.

Verify the Output

You’re now ready to generate, customize, and run API code seamlessly with Geonode.

On this page