Skip to main content

What is Stru Search API?

The Stru Search API provides intelligent, hybrid search across a comprehensive library of building codes and engineering standards. Combining keyword precision with semantic understanding, it enables engineers to quickly find relevant code clauses, requirements, and technical specifications. Base URL: https://api.stru.ai/v1 Authentication: Bearer token (API key from app.stru.ai)

Core Concepts

Hybrid Search

Combines keyword search for exact matches (section numbers, terms) with semantic search for conceptual understanding of natural language queries.

Async Jobs

All searches run as asynchronous jobs. Submit a search, receive a job ID, then poll for results. No blocking waits.

Design Standards

Search across multiple regional standards: US (AISC, ACI, ASCE), Eurocode, Australian/NZ (AS), and Canadian (CSA) codes.

Contextual Results

Get not just matches, but surrounding context, page numbers, relevance scores, and content type (text, table, figure).

Building Code Library

Access to 20+ major engineering standards:
  • ACI 318-19: Building Code Requirements for Structural Concrete
  • ACI 349-23: Code Requirements for Nuclear Safety-Related Concrete Structures
  • ACI/PCI 319-25: Building Code Requirements for Structural Precast Concrete
  • ASCE 7-16: Minimum Design Loads (2016 Edition)
  • ASCE 7-22: Minimum Design Loads (2022 Edition)
  • AISC Steel Manual 16th: Steel Construction Manual
  • USACE EM 1110-2-2100: Stability Analysis of Concrete Structures
  • USACE EM 1110-2-2104: Strength Design for Reinforced-Concrete Hydraulic Structures
  • AASHTO LRFD 9th: Bridge Design Specifications
  • EN 1992-1-1: General rules and rules for buildings
  • EN 1992-1-2: Structural fire design
  • EN 1992-2: Concrete bridges
  • EN 1992-3: Liquid retaining and containment structures
  • EN 1992-4: Design of fastenings for use in concrete
  • AS 1418.1-2021: Cranes, hoists and winches - General requirements
  • AS 1418.2-1997: Serial hoists and winches
  • AS 1418.18-2024: Crane runways and monorails
  • AS 4991-2004: Lifting devices
  • AS 4100-2020: Steel structures (with Amendment 1-2021)
  • CSA S16-24: Design of steel structures
  • CSA S6-19: Canadian Highway Bridge Design Code

Key Features

  • Intelligent Query Understanding: Handles section numbers (“AISC 360-16 G2.1”), technical terms (“deflection limits”), and natural language questions
  • Scoped Search: Filter by design standard, specific document, or search globally
  • Rich Context: Get page numbers, surrounding text, and content type for each match
  • Relevance Scoring: Results ranked by relevance (0.0-1.0 scale)
  • Rate Limited: 120 requests/minute based on subscription tier
  • Pagination: Retrieve up to 200 results per query with configurable page size

Quick Start

1

Get Your API Key

Sign in to app.stru.ai and generate an API key from your dashboard.
# Your API key will look like:
sk_live_abc123...
2

Submit a Search Job

Create a search job with your query.
curl -X POST https://api.stru.ai/v1/search/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "deflection limits for steel roof beams",
    "design_standard": "us",
    "per_page": 10
  }'
Response:
{
  "job_id": "job_abc123",
  "status": "pending",
  "created_at": "2025-10-17T10:30:00Z"
}
3

Poll for Results

Check the job status until complete.
curl https://api.stru.ai/v1/jobs/job_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY"
When complete:
{
  "job_id": "job_abc123",
  "status": "completed",
  "results": {
    "total": 15,
    "matches": [...]
  }
}
4

Use the Results

Process the search results with page numbers and context.
for match in results['matches']:
    print(f"{match['file_id']} - Page {match['page_number']}")
    print(f"Snippet: {match['snippet']}")
    print(f"Score: {match['relevance_score']}")

Search Capabilities

Section Numbers

Search for specific code sections.
"Section 10.5.3"
"AISC 360-16 G2.1"

Technical Terms

Find clauses using engineering terminology.
"reinforcement requirements"
"load combinations"

Natural Language

Ask questions in plain English.
"What are the deflection limits for steel beams?"

Tables & Figures

Search within tables and figure captions.
"load factor table"
"Figure 6.2 connections"

API Workflow

All searches follow an asynchronous job-based workflow: Why Async?
  • Handles complex semantic searches that may take 1-5 seconds
  • Prevents timeout issues on slow networks
  • Supports high concurrent traffic without blocking

Best Practices

More specific queries yield better results. Instead of “concrete”, try “concrete compressive strength requirements for beams”.
If you know the regional code, filter by design_standard to reduce noise and improve relevance.
{
  "query": "deflection limits",
  "design_standard": "us"
}
Don’t spam the status endpoint. Use exponential backoff (1s, 2s, 4s, 8s) to reduce API calls.
import time
delay = 1
while status != "completed":
    time.sleep(delay)
    status = check_job_status(job_id)
    delay = min(delay * 2, 8)  # Max 8 seconds
Search results for common queries don’t change often. Cache results for 24 hours to reduce API usage.
Stay within 120 requests/minute. Implement client-side rate limiting and handle 429 errors gracefully.

Common Use Cases

Automated Compliance Checking

Integrate search into CI/CD pipelines to flag design parameters that conflict with code updates.

Engineering Research

Quickly gather all relevant clauses across multiple standards for novel structural systems.

In-App Code Reference

Embed search in engineering tools to provide instant code lookups during design.

Design Review

Verify calculations reference the correct code sections and requirements.

Learning & Training

Help engineers explore and understand building code requirements through natural language queries.

Documentation Generation

Automatically cite relevant code sections in engineering reports and calculations.

Rate Limits & Quotas

TierRequests/MinuteMax Results/QueryJob Retention
Free30501 hour
Pro12020024 hours
EnterpriseCustomCustomCustom
Rate limits are enforced per API key. Exceeded limits return a 429 Too Many Requests error.

Integration with Other Stru APIs

The Search API integrates seamlessly with other Stru services:
1

Search for Code Requirements

Use the Search API to find specific code clauses.
"ASCE 7-22 load combinations for seismic"
2

Generate Calculations

Feed results into the Mathcad API to auto-generate calculations that reference the found code sections.
3

Create Reports

Use the Excel API to build compliance reports with automatically cited code references.

Next Steps