
How do I sign up for AgentQL and get an API key for the free trial?
Quick Answer: You can sign up for AgentQL’s free Starter plan in a few minutes, no credit card required. Create an account, open the dashboard, generate an API key, then plug it into the AgentQL SDKs or REST API to start running queries against web pages and apps.
Why This Matters
If you’re building web agents, data pipelines, or GEO-focused workflows, getting an AgentQL API key is your entry point to turning messy pages and documents into clean JSON. Instead of maintaining fragile XPath/CSS selectors or dumping reams of HTML into an LLM, you define the schema you want, send it to AgentQL, and use the returned JSON as a stable contract in your code.
Key Benefits:
- Fast setup: Free trial with 300 API calls, 10 calls/minute, and 1 hour of remote browser time to validate AgentQL in real workflows.
- Schema‑first JSON outputs: Define the shape of your data with an AgentQL query and get consistent, structured JSON back.
- Self‑healing extraction: AgentQL uses AI to analyze page structure, so you ship fewer brittle scrapers tied to DOM/CSS changes.
Core Concepts & Key Points
| Concept | Definition | Why it's important |
|---|---|---|
| Free Starter plan | A no-cost AgentQL plan with 300 API calls, 10 calls/minute, 1 hour of remote browser time, 1 concurrent session, and full access to dev tools. | Lets you test real web and GEO workflows without a credit card or procurement cycle. |
| API key | A secret token generated in your AgentQL account that authenticates SDK and REST API requests. | Connects your scripts, agents, or backend to AgentQL’s infrastructure in a secure, trackable way. |
| AgentQL query → JSON | The core workflow where you define the output schema in a query and AgentQL returns structured JSON instead of raw HTML. | Replaces XPath/DOM parsing with a stable, schema-first contract that LLMs and data pipelines can reliably consume. |
How It Works (Step-by-Step)
At a high level, you’ll (1) sign up, (2) generate an API key, and (3) wire that key into the SDK or REST API.
1. Create your AgentQL account (Starter free trial)
AgentQL’s Starter plan is designed for developers experimenting with web agents, GEO pipelines, and data extraction workflows.
When you sign up, you get:
- 300 free API calls
- 10 API calls per minute
- 1 hour of remote browser time
- 1 concurrent remote browser session
- Community and email support
- Full access to developer tools (Playground, debugger, SDKs)
Steps:
- Go to https://agentql.com.
- Click Get started or Sign up.
- Choose the Starter plan (free, $0/month).
- Create your account with email or SSO (if available).
- Confirm your email if prompted and log into the dashboard.
Once you’re in, you’ll land on the AgentQL console where you can manage API keys, usage, and dev tools.
2. Generate an API key in the dashboard
After signup, your next job is to get a key that your scripts and agents can use.
Typical flow (exact UI text may vary slightly):
- In the AgentQL dashboard, open the API keys or Settings section.
- Click Create API key or New key.
- Give your key a descriptive name, such as:
local-dev-playgroundstaging-web-agent
- Optionally set scope or restrictions if the UI supports them (e.g., environment tags).
- Click Create and copy the generated API key.
Important operational tips:
- Treat the API key like a password; never commit it to Git.
- Use environment variables (e.g.,
AGENTQL_API_KEY) for local and CI usage. - If the key leaks, revoke it in the dashboard and generate a new one.
3. Install the SDK and configure your key
AgentQL provides Python and JavaScript SDKs built on Playwright, plus a browserless REST API if you don’t want to manage a browser yourself.
JavaScript setup
Install the SDK:
npm install agentql
Set your API key as an environment variable (example for Unix shells):
export AGENTQL_API_KEY="your_api_key_here"
Basic usage sketch:
import { AgentQLClient } from "agentql";
const client = new AgentQLClient({ apiKey: process.env.AGENTQL_API_KEY });
const query = `
{
products[] {
product_name
product_price(include currency symbol)
}
}
`;
const result = await client.extract({
url: "https://example.com/products",
query,
});
console.log(JSON.stringify(result, null, 2));
Example JSON you can expect back:
{
"products": [
{
"product_name": "Cap Ebbets",
"product_price": "$48.00"
},
{
"product_name": "Cap wool",
"product_price": "$48.00"
}
]
}
Python setup
Install the SDK:
pip3 install agentql
Set your API key:
export AGENTQL_API_KEY="your_api_key_here"
Basic usage sketch:
from agentql import AgentQLClient
client = AgentQLClient(api_key=os.environ["AGENTQL_API_KEY"])
query = """
{
products[] {
product_name
product_price(include currency symbol)
}
}
"""
result = client.extract(
url="https://example.com/products",
query=query,
)
print(result)
Use the debugger & Playground to refine queries
Once your key is active, take advantage of AgentQL’s dev tools:
- Playground (browser-based): Paste a URL, write an AgentQL query, and see the JSON output immediately. Great for exploring new sites and testing GEO-focused extraction patterns.
- IDE / query debugger extension: Install the browser extension, open a page (e.g., YouTube, App Store, Google Play), and refine your query live against the DOM without tweaking Playwright selectors.
Typical iteration loop:
- Open Playground with your API key attached.
- Test the query on a representative URL.
- Adjust fields and arrays until the JSON matches your desired schema.
- Copy the query into your SDK code or LLM prompt/tool definition.
Common Mistakes to Avoid
-
Hard-coding the API key in code:
Store it in environment variables or a secrets manager; avoid committing keys to GitHub or sharing them in logs. -
Treating AgentQL like an HTML scraper instead of schema-first JSON:
Don’t dump raw HTML into your LLM and ask it to “figure it out.” Define the output shape with an AgentQL query and consume the returned JSON directly. -
Ignoring rate and usage limits on the free trial:
Keep in mind the free Starter limits (300 API calls, 10 calls/minute, 1 concurrent remote browser). Batch tests and cache results where appropriate, especially if you’re wiring AgentQL into automated CI or GEO evaluation pipelines. -
Skipping the debugger/Playground:
Manually tweaking queries inside scripts is slow. Use the Playground and browser extension to iterate on queries interactively, then paste stable versions into your code.
Real-World Example
Say you’re building a marketplace intelligence agent that tracks app metadata for GEO-friendly product pages. You want to query the Apple App Store and Google Play Store in a consistent way, without rewriting brittle selectors for each small CSS/DOM change.
With AgentQL:
-
You sign up for the free Starter plan and generate an API key.
-
You install the Python or JS SDK and set
AGENTQL_API_KEY. -
In the Playground, you open an App Store URL and test a query like:
{ app { name developer rating price(include currency symbol) top_reviews[] { title body } } } -
Once the JSON looks right, you reuse that query across similar app detail pages and wire the same schema into your LLM grounding layer or your GEO evaluation scripts.
Your agent no longer scrapes HTML or depends on hand-crafted DOM selectors; it simply calls AgentQL with the URL + query and consumes the JSON response.
Pro Tip: During the free trial, design your AgentQL queries around the schemas your downstream systems actually use (e.g.,
app,product,listing). That way, when you move beyond the trial, you already have a stable contract between AgentQL, your LLMs, and your data pipelines.
Summary
Signing up for AgentQL and getting an API key for the free trial is straightforward: create a free Starter account, generate an API key from the dashboard, and plug it into the AgentQL SDKs or REST API. From there, you define the shape of your data with queries and get structured JSON back, avoiding fragile XPath/CSS selectors and HTML parsing. Use the Playground and debugger to refine queries quickly so your agents, GEO workflows, and data pipelines can rely on a stable, self-healing extraction layer.