DEVELOPER API

Field a synthetic research study
from a single API call.

Commission moderated audience research with census-grounded synthetic respondents. Structured sentiment data and cited reasoning return in seconds. Programmatic access to every instrument exposed via the web UI.

ON THIS PAGE

QuickstartAuthenticationEndpointsCode ExamplesDemographic PresetsUse CasesRate Limits & Tiers

Quickstart

Three steps to field your first study:

1. Get an API key

Programmatic access requires a CrowdAI account on the Pro or Enterprise plan. Create a key by posting your user ID:

BASH
curl -X POST https://crowdai.up.railway.app/api/v1/developer/keys \
  -H "Content-Type: application/json" \
  -d '{"user_id": "YOUR_USER_ID", "name": "My App"}'

Save the key field from the response — the raw value is shown only once at creation.

2. Run a simulation

One API call creates, runs, and returns the full results payload:

BASH
curl -X POST https://crowdai.up.railway.app/api/v1/developer/simulations \
  -H "Authorization: Bearer crowd_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "Should companies mandate return-to-office?",
    "mode": "voting",
    "demographic_preset": "us_general_population",
    "population_size": 50
  }'

3. Read the results

The response includes a resultsobject with the sentiment summary, diversity score, and every respondent’s individual response — persona, demographics, OCEAN profile, and cited reasoning.

Authentication

All endpoints (except key creation) require a Bearer token in the Authorization header:

HTTP
Authorization: Bearer crowd_aBcDeFgH1234...

Keys are prefixed with crowd_ and stored as SHA-256 hashes on our infrastructure. The raw key is returned only at creation.

Security notice: Treat API keys as credentials. Do not commit to version control or expose in client-side code. Resolve via environment variables.

Endpoints

KEY MANAGEMENT

POST
/developer/keys

Create a new API key (requires user_id + pro/enterprise plan)

GET
/developer/keys

List all your API keys

DELETE
/developer/keys/{id}

Revoke an API key

GET
/developer/usage

Monthly usage summary (simulations, tokens, cost)

SIMULATIONS

POST
/developer/simulations

Field a study synchronously and receive the full results payload

POST
/developer/simulations/async

Launch a study in the background (returns immediately with polling URLs)

GET
/developer/simulations/{id}

Retrieve a study and its findings

GET
/developer/simulations/{id}/status

Lightweight status poll (no payload)

GET
/developer/presets

Enumerate all demographic presets with OCEAN profiles

Code Examples

PYTHON

PYTHON
import requests

API_KEY = "crowd_YOUR_API_KEY"
BASE = "https://crowdai.up.railway.app/api/v1/developer"
headers = {"Authorization": f"Bearer {API_KEY}"}

# Run a simulation
response = requests.post(f"{BASE}/simulations", headers=headers, json={
    "topic": "Is remote work better for productivity?",
    "mode": "voting",
    "demographic_preset": "tech_early_adopters",
    "population_size": 100,
    "stance_statement": "Remote work improves employee productivity",
})

result = response.json()
print(f"Status: {result['status']}")
print(f"Results: {result['results']['summary']}")

# List available presets
presets = requests.get(f"{BASE}/presets", headers=headers).json()
print(f"{presets['count']} presets available")

ASYNC (LARGE POPULATIONS)

BASH
# Launch in background (returns immediately)
curl -X POST https://crowdai.up.railway.app/api/v1/developer/simulations/async \
  -H "Authorization: Bearer crowd_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "Should companies mandate return-to-office?",
    "mode": "voting",
    "demographic_preset": "us_general_population",
    "population_size": 500
  }'

# Response: { "id": "sim-abc", "status": "pending",
#   "poll_url": "/api/v1/developer/simulations/sim-abc/status",
#   "results_url": "/api/v1/developer/simulations/sim-abc" }

# Poll until complete
curl -H "Authorization: Bearer crowd_YOUR_API_KEY" \
  https://crowdai.up.railway.app/api/v1/developer/simulations/SIM_ID/status

# Fetch full results once status is "complete"
curl -H "Authorization: Bearer crowd_YOUR_API_KEY" \
  https://crowdai.up.railway.app/api/v1/developer/simulations/SIM_ID

JAVASCRIPT / TYPESCRIPT

JAVASCRIPT
const API_KEY = "crowd_YOUR_API_KEY";
const BASE = "https://crowdai.up.railway.app/api/v1/developer";

// Run a simulation
const response = await fetch(`${BASE}/simulations`, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    topic: "What do consumers think about subscription fatigue?",
    mode: "voting",
    demographic_preset: "millennials",
    population_size: 200,
  }),
});

const { id, status, results } = await response.json();
console.log(`Simulation ${id}: ${status}`);
console.log("Summary:", results.summary);

// Each agent's response includes their persona + reasoning
for (const agent of results.agents.slice(0, 3)) {
  console.log(`${agent.name} (${agent.sentiment}): ${agent.reasoning}`);
}

Demographic Presets

Every study targets a demographic preset — a statistically grounded population model calibrated against published distributions (US ACS 2023, UK ONS 2021, AU ABS 2021) with OCEAN trait distributions from Rentfrow 2008 and Schmitt 2007.

Forty-two presets ship by default across six categories. Enumerate via GET /developer/presets or reference this selection:

us_general_population

US General Pop

Census-weighted American adults

millennials

Millennials (28-43)

Digital-savvy, experience-focused

tech_early_adopters

Tech Adopters

Innovation-driven professionals

india_urban

India (Urban)

Delhi, Mumbai, Bangalore metros

germany

Germany

Manufacturing + engineering economy

au_melbourne

Melbourne, AU

Arts, coffee, university culture

japan

Japan

Aging population, consensus culture

brazil

Brazil

Services + commodities, coastal + interior

+ 34 more including US states, UK regions, Australian metros, South Korea, France, Canada, Mexico, and age cohorts.

Application Domains

The API supplements traditional survey and qualitative panel research. Representative deployments:

Message-market fit

Field value-proposition research across multiple audience presets before go-to-market commitment. Re-field the identical instrument by preset to quantify resonance differentials.

millennials"Would you pay $15/month for AI-powered meal planning?"

Market entry research

Prior to geographic expansion, quantify local sentiment toward the product category. Country-specific presets carry localized demographics and culturally calibrated trait distributions.

germany"Would you switch from a local bank to a digital-only challenger bank?"

Message variant testing

Evaluate multiple copy variants against an identical respondent panel via the stance_statement parameter. Sentiment and cited reasoning attribute outperformance to specific factors.

tech_early_adopters"Our AI assistant saves you 10 hours per week"

Policy impact assessment

Quantify public reaction to proposed policy across demographic segments. Re-field by preset to isolate regional, generational, and cohort-level response differentials.

us_general_population"Should employers be required to disclose AI usage in hiring?"

Content strategy validation

Pre-field press releases, long-form content, and social campaigns against a representative respondent panel. Structured agree/disagree/undecided output with per-respondent reasoning.

small_business_owners"Small businesses should prioritize sustainability over short-term profit"

Competitive positioning research

Measure brand perception relative to competitors. Stance statements fix the comparison axis for clean sentiment measurement across customer segments.

us_california"Brand X offers better value than Brand Y for daily use"

Rate Limits & Tiers

Pro ($99/mo)Enterprise (custom)
Max agents per sim7502,000
Rate limit30 req/min120 req/min
API accessYesYes
Async simulationsYesYes
Token budget per sim3M tokens10M tokens
Export formatsCSV, JSON, PDFAll
SupportEmailDedicated

Fielding duration:A 20-respondent Pulse study typically completes in 5–15 seconds. Panels at scale (200+ respondents) typically field in 30–120 seconds. For large populations, use POST /simulations/async which returns immediately, then poll GET /simulations/{id}/status until complete. Rate-limited requests receive a 429 with a Retry-After header.

Ready to ask the crowd?

Sign up for a Pro plan, create an API key, and run your first simulation in under a minute.

Get started