jgravelle

Groqqle API Guide For Developers — Development agent for Claude Code

Development community intermediate

This guide demonstrates how to use Groqqle's API functionalities for developers without the GUI interface.

How to install Groqqle API Guide For Developers

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jgravelle/Groqqle and copy the folder into ~/.claude/agents/.

What Groqqle API Guide For Developers does

This guide demonstrates how to use Groqqle's API functionalities for developers without the GUI interface.

Alternatives in Development

  • Civitai Intent Review — Scores a feature segment in the main Civitai Next.js app (src/) against the intent doc for the work — did the 7.2k ★
  • Dao Qi Harmony Designer — This agent should be used when designing, evaluating, or refining software products to ensure harmony between 5.2k ★
  • Spark — You are a lightweight implementation agent 3.6k ★

README

Groqqle API Guide for Developers

This guide demonstrates how to use Groqqle's API functionalities for developers without the GUI interface.

Overview

Groqqle offers two main approaches for developers to integrate search capabilities into their applications:

  1. HTTP REST API: Start Groqqle in API mode and make HTTP requests to it
  2. Direct Python Integration: Use the Groqqle_web_tool class in your Python code

Method 1: Using the HTTP REST API

Starting the API Server

To use Groqqle's API server, run:

python Groqqle.py api --num_results 20 --max_tokens 4096

The API server will start running on `http://127.0.0.1:5000`.

Making API Requests

You can send POST requests to the `/search` endpoint with the following parameters:

{
  "query": "your search query",
  "num_results": 20,
  "max_tokens": 4096,
  "search_type": "web"  // Use "web" for web search or "news" for news search
}

Python Example

import requests
import json

def groqqle_search(query, search_type="web", num_results=10, max_tokens=4096):
    """Function to perform a search using Groqqle's API."""
    api_url = "http://127.0.0.1:5000/search"
    
    payload = {
        "query": query,
        "num_results": num_results,
        "max_tokens": max_tokens,
        "search_type": search_type  # "web" or "news"
    }
    
    response = requests.post(api_url, json=payload)
    response.raise_for_status()
    return response.json()

# Example usage
results = groqqle_search("quantum computing breakthroughs", search_type="web")
for result in results:
    print(f"Title: {result['title']}")
    print(f"URL: {result['url']}")
    print(f"Description: {result['description'][:100]}...")
    print("")

Response Format

The API returns a JSON array of results, each containing:

  • title: The title of the webpage or article
  • url: The URL of the result
  • description: A brief description or snippet
  • source and timestamp: (for news results only)

Method 2: Direct Python Integration

You can integrate Groqqle directly into your Python applications without starting a separate server by using the `Groqqle_web_tool` class.

Basic Usage

from Groqqle_web_tool import Groqqle_web_tool

# Initialize the tool with your API key and configuration
groqqle_tool = Groqqle_web_tool(
    api_key='your_groq_api_key_here',
    provider_name='groq',  # Can also use 'anthropic' if configured
    num_results=10,        # Number of search results to return
    max_tokens=4096,       # Max tokens for AI responses
    model='llama3-8b-8192', # Model to use
    temperature=0.0,        # Temperature setting for generation
    comprehension_grade=8   # Target reading level (1-15)
)

# Perform a web search
query = 'latest advancements in artificial intelligence'
results = groqqle_tool.run(query)

# Process the search results
for result in results:
    print(f"Title: {result['title']}")
    print(f"URL: {result['url']}")
    pri