API Reference

Learn how to integrate with our sensor data API

Quick Start

Base URL

https://api.useagroqr.com/v3

Authentication

Include your API key in the header:

X-API-Key: your_api_key_here

Rate Limits

Standard tier: 10,000 requests/day

Premium tier: 1,000,000 requests/day


Get API Tokens

Our team will reach out to you in 1-2 days to let you try out our API. Please join our waitlist. Thanks for your interest!

Request an API Token
Sensor Data Endpoint

GET Sensor Data

GET /sensor/{qr_code_id}

Retrieves the latest data from a specific sensor by its QR code ID.

Path Parameters

  • qr_code_id (required) - The unique identifier of the sensor

Query Parameters

  • include_history=true (optional) - Include historical data points
  • days=7 (optional) - Number of days of history to include
Code Samples
Python example
import requests

def get_sensor_data(qr_code_id, api_key):
    url = f"https://api.useagroqr.com/v3/sensor/{qr_code_id}"
    headers = {
        "X-API-Key": api_key,
        "Accept": "application/json"
    }
    
    try:
        response = requests.get(url, headers=headers)
        response.raise_for_status()  # Raise exception for 4XX/5XX responses
        return response.json()
    except requests.exceptions.RequestException as e:
        print(f"Error fetching sensor data: {e}")
        return None

# Usage
api_key = "your_api_key_here"
data = get_sensor_data("JAwKj1zVnq", api_key)

if data:
    print(f"Temperature: {data['sensing_data']['temperature']['value']}")
    print(f"Location: {data['metadata']['sensor_placement']['location_description']}")