September 26, 2026
# How to build an AI agent that can research, monitor, and extract data from the web
A web-capable agent needs three distinct capabilities, and each one fails differently when it is built on scrapers. This guide covers the LLM-plus-tools architecture, then builds the agent in four steps: semantic web search, objective-driven extraction, continuous monitoring, and multi-step workflows with structured output, along with what production requires for data quality and reliability.
## Key takeaways
- - A web-capable AI agent combines an LLM with specialized tools for search, extraction, and monitoring
- - Reliable web access comes from purpose-built APIs; scrapers break when sites change
- - The architecture follows a research-act-verify loop[research-act-verify loop] with continuous data quality checks
- - Production agents need source attribution, rate limit handling, and enterprise-grade reliability
- - Parallel's APIs provide the infrastructure layer for each capability: Search API, Extract API, Task API, and Monitor API
## What a web-capable AI agent does
A web-capable AI agent[AI agent] accesses, processes, and acts on live web data without human intervention. Instead of answering questions from static training data, it gathers fresh information, tracks changes over time, and extracts structured data from pages across the internet.
An LLM trained on data from six months ago knows nothing about this week's funding announcements, regulatory changes, or product launches. A web-capable agent retrieves that information in real time and incorporates it into its responses.
This type of agent has three core capabilities:
**Research**: The agent discovers and synthesizes information from multiple sources. A sales team might ask it to compile everything known about a prospect company. A compliance officer might need it to surface recent regulatory changes in a specific jurisdiction.
**Monitor**: The agent tracks changes over time and alerts you when something relevant happens. E-commerce teams track competitor pricing. PR teams follow brand mentions. Investment analysts watch for SEC filings.
**Extract**: The agent pulls structured data from web pages. CRM enrichment pipelines feed it a company URL and receive back employee counts, funding history, and executive names in clean JSON. A financial analyst might feed it SEC filing URLs and receive back quarterly revenue figures and risk factors.
A chatbot with web search bolted on retrieves pages and summarizes them. An agent orchestrates multiple tools, verifies findings across sources, and produces structured outputs that integrate into your systems.
Fintech firms use these agents to run due diligence on potential investments, sales teams enrich CRM records with fresh company data, compliance departments track regulatory changes across jurisdictions, and media companies aggregate news from hundreds of sources. Each use case combines research, monitoring, and extraction in a different sequence.
Parallel's API suite maps onto these capabilities: Search API handles research, Extract API retrieves structured content, Monitor API provides continuous tracking, and Task API orchestrates multi-step workflows that combine all three.
## Core architecture: LLM + tools + orchestration loop
Every web-capable agent has three layers: reasoning, capabilities, and orchestration.
The **reasoning layer** is the LLM. It interprets instructions, plans actions, and synthesizes information. On its own, though, it works from training data that goes stale the moment it's collected, and it will hallucinate with confidence when it lacks grounding in current facts.
The **capabilities layer** consists of tools the agent can invoke. Web search tools find relevant pages. Extraction tools pull clean content from URLs. Database tools store and retrieve information. Action tools send emails, update records, or trigger workflows. A search tool that returns noisy, irrelevant results will produce a noisy, irrelevant agent.
The **orchestration layer**[**orchestration layer**] controls how the agent moves between reasoning and tool use. The basic loop works like this:
- Receive a task
- Plan the steps needed
- Execute a tool
- Observe the result
- Reason about what to do next
- Repeat until complete or escalate if stuck
Parallel's APIs slot into the capabilities layer. They return LLM-optimized outputs: token-dense excerpts instead of raw HTML, structured JSON instead of unprocessed text, citations and confidence scores instead of black-box answers.
## Step 1: Give your agent web research capabilities
### Why traditional scraping fails for agents
Building your own web scraping infrastructure[web scraping infrastructure] runs into several problems at scale.
BeautifulSoup and Selenium require site-specific parsing logic. You write a parser for one website, and it breaks when that site changes its HTML structure. Cloudflare's bot detection blocks your requests. JavaScript-rendered content never loads in your headless browser. CAPTCHAs demand human intervention.
Raw HTML wastes tokens. A typical web page contains navigation bars, footers, ads, cookie consent banners, and thousands of lines of markup surrounding a few paragraphs of actual content. Passing all of this to your LLM burns context window space on noise.
Traditional search engines rank by SEO signals, and keyword search inherits that. Your agent needs pages ranked by usefulness for its specific task.
The maintenance burden compounds as you add sources. Ten sites means ten parsers to maintain. A hundred sites becomes a full-time job. And pagination handling, session management, and proxy rotation add layers of complexity before you've extracted a single useful fact.
### Implementing semantic web search
Semantic search APIs[Semantic search APIs] solve these problems by letting agents describe what they need in natural language.
Instead of constructing keyword queries, the agent specifies an objective: "Find Columbus-based corporate law firms specializing in disability care." The API returns URLs ranked by how useful each page's content is for that specific objective.
Results come back optimized for LLM consumption:
- - **Token-dense excerpts**: Compressed, query-relevant text that makes efficient use of context window space
- - **Structured outputs**: URLs, titles, publish dates, and excerpts in clean JSON
- - **Freshness controls**: Specify how recent results must be, or trigger live crawls when needed
- - **Source control**: Include or exclude specific domains to shape result quality
Call Parallel Search API[Parallel Search API] with a POST request:
123456789101112import requests
response = requests.post(
"https://api.parallel.ai/v1/search",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"objective": "Find recent funding rounds for AI startups in healthcare",
"max_results": 10,
"freshness": "past_week"
}
)
results = response.json()["results"]``` import requests response = requests.post( "https://api.parallel.ai/v1/search", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "objective": "Find recent funding rounds for AI startups in healthcare", "max_results": 10, "freshness": "past_week" })results = response.json()["results"]``` This returns ranked URLs with excerpts optimized for your LLM's context window. Each result includes a title, URL, publish date, and dense excerpt. Your agent can pass these excerpts to the LLM for synthesis without additional processing.
Parallel Search API handles premium content without extra configuration: JavaScript-rendered pages and PDFs return clean, usable text. The API maintains its own web-scale index of billions of pages, adding millions more each day. This proprietary index enables ranking by semantic relevance rather than SEO signals.
On parallel.ai/benchmarks[parallel.ai/benchmarks] (September 2026), with a GPT-5.6 Sol agent, Advanced mode scores 97% on SimpleQA Verified and 74% on BrowseComp, level with Perplexity on BrowseComp. The rate limit of 600 requests per minute supports production-scale deployments.
## Step 2: Add structured data extraction
### The extraction problem
Web pages contain navigation menus, advertisements, footers, and boilerplate text alongside the content you want. JavaScript-rendered single-page applications require headless browsers. PDFs need dedicated parsers. Every site structures its content differently.
Your agent needs focused, clean content. Passing raw HTML to an LLM forces it to separate signal from noise while burning tokens on markup.
### Objective-driven extraction
Extraction APIs let you describe what you want in natural language and receive focused excerpts.
Tell the API your objective, and it returns only the relevant portions of the page. Request full-page conversion for situations where you need everything as clean markdown. The infrastructure handles JavaScript rendering and PDF parsing without additional configuration.
Combine extraction with search: find pages with Search API, then pull their contents with Extract API.
123456789response = requests.post(
"https://api.parallel.ai/v1/extract",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"urls": ["https://example.com/company-about"],
"objective": "Extract the company name, founding year, and total funding raised"
}
)
extracted_data = response.json()``` response = requests.post( "https://api.parallel.ai/v1/extract", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "urls": ["https://example.com/company-about"], "objective": "Extract the company name, founding year, and total funding raised" })extracted_data = response.json()``` This returns clean, structured content ready for LLM consumption without HTML cleanup or post-processing.
A typical workflow chains Search and Extract together. Your agent searches for "Series B funding announcements this week," receives a list of URLs from news sites and press releases, then extracts the company name, funding amount, lead investor, and valuation from each page. The LLM synthesizes these structured facts into a market intelligence report[market intelligence report].
Parallel Extract API processes up to 20 URLs per request, returns results in 1-20 seconds, and costs $1 per 1,000 URLs.
## Step 3: Build continuous monitoring
### From point-in-time to continuous intelligence
One-time research starts going stale as soon as you finish it: a competitive analysis captures a snapshot, and a lead enrichment reflects data at the time of collection.
Many agent use cases require continuous awareness. Competitive intelligence teams need to know when a competitor launches a product. Compliance teams must track regulatory changes. E-commerce teams monitor price shifts across marketplaces.
Without monitoring, you either poll on a constant schedule, which costs money and hits rate limits, or miss events.
With an event-driven architecture, your agent defines what it cares about and the monitoring system notifies it when something relevant happens. The agent sleeps until an event triggers it, then wakes up to process the new information.
Take competitive intelligence: your sales team wants to know the moment a competitor announces a new product, changes pricing, or raises funding. A monitor tracks these events across news sites, press releases, and the competitor's own website. When something triggers, your agent receives a webhook notification containing the event summary, source URL, and event timestamp. The agent can then extract full details, update your CRM, and notify the sales team.
### Implementing web monitors
Monitor API[Monitor API] lets you define tracking queries in plain English and receive webhook notifications when new relevant events appear.
Set up a monitor by specifying:
- - **Query**: Describe what events you care about in natural language
- - **Cadence**: Hourly, daily, or weekly, based on how fast your domain moves
- - **Webhook URL**: Where to send notifications when events occur
12345678910response = requests.post(
"https://api.parallel.ai/v1/monitors",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"query": "New AI regulations announced by the EU",
"cadence": "daily",
"webhook_url": "https://your-app.com/webhooks/monitor"
}
)
monitor_id = response.json()["id"]``` response = requests.post( "https://api.parallel.ai/v1/monitors", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "query": "New AI regulations announced by the EU", "cadence": "daily", "webhook_url": "https://your-app.com/webhooks/monitor" })monitor_id = response.json()["id"]``` The API handles deduplication. You see each event once, even if multiple sources cover the same story.
Compose monitors with other tools. When an event arrives, trigger Extract API to pull full content from the source URL. Use Search API to gather additional context. Run Task API to produce structured analysis.
Parallel Monitor API turns web search into an always-on feed that triggers downstream agent workflows. At $3 per 1,000 executions, it costs less than building and maintaining your own monitoring infrastructure.
## Step 4: Orchestrate multi-step workflows
### When simple search isn't enough
Some questions require multiple searches, cross-referencing, and synthesis. "Find the CEO of Acme Corp, their career background, recent news mentions, and probable contact information" is a deep research[deep research] project that requires:
- Finding the company's leadership page
- Identifying the CEO's name
- Searching for professional profiles
- Gathering recent news mentions
- Synthesizing everything into a structured profile
Manual orchestration with prompt chaining breaks when any step fails. You write code to handle step 1, then step 2, then step 3. Each step needs its own error handling. If news mentions conflict with the company's claims, your synthesis step also needs reconciliation logic.
### Structured deep research with Task API
Task API[Task API] combines AI inference with web search and live crawling to automate structured web research. Define your inputs and outputs as schemas, and the API handles research planning, web access, synthesis, and verification.
12345678910111213141516response = requests.post(
"https://api.parallel.ai/v1/tasks",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"objective": "Research this company and return structured data",
"input": {"company_name": "Acme Corp", "domain": "acme.com"},
"output_schema": {
"ceo": "string",
"employee_count": "number",
"recent_funding": "string",
"competitors": "array"
},
"processor": "core"
}
)
task_id = response.json()["id"]``` response = requests.post( "https://api.parallel.ai/v1/tasks", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={ "objective": "Research this company and return structured data", "input": {"company_name": "Acme Corp", "domain": "acme.com"}, "output_schema": { "ceo": "string", "employee_count": "number", "recent_funding": "string", "competitors": "array" }, "processor": "core" })task_id = response.json()["id"]``` Match compute depth to task complexity with processor tiers:
| Processor | Output | Latency | Price per 1,000 runs |
|---|---|---|---|
| lite | Basic metadata | 10 to 60 seconds | $5 |
| core | Cross-referenced outputs | 1 to 5 minutes | $25 |
| pro | Exploratory web research | 2 to 10 minutes | $100 |
| ultra | Advanced multi-source deep research | 5 to 25 minutes | $300 |
Every output includes Parallel's Basis framework: citations linking each fact to its source URL, reasoning chains explaining how the agent reached its conclusions, and confidence levels (low, medium, or high) indicating reliability.
On the DeepSearchQA subset on parallel.ai/benchmarks[parallel.ai/benchmarks] (August 2026), Task API Pro scored 83% at $100 per 1,000 runs, and Gemini 3.1 Pro (high) scored 77% at $123.90 per 1,000 queries. Cost per run compounds when you're enriching thousands of CRM records or running due diligence on hundreds of potential acquisitions.
The Task API also supports task groups for batch processing. Submit 500 company enrichment requests, and the API handles parallelization, progress tracking, and result aggregation. Your code submits the batch and receives a webhook when all results are ready.
## Production considerations
### Data quality and verification
Implement verification at multiple levels:
**Source attribution**: Every fact should trace back to a URL. When your agent claims a company raised $50 million, the output should include the source link. Parallel's Basis framework[Basis framework] provides per-field citations by default.
**Confidence scoring**: Calibrated estimates help you decide when to trust outputs and when to escalate. Low confidence on a critical field triggers human review.
**Cross-referencing**: For high-stakes decisions, verify critical facts across multiple sources. If two sources disagree on a company's employee count, flag the discrepancy.
**Hallucination prevention**: Ground every response in retrieved content. When the agent can't find supporting evidence, it should say so rather than fabricate an answer.
**Human-in-the-loop**: Define escalation criteria. Uncertain findings, high-stakes decisions, and conflicting sources should route to human reviewers. A due diligence agent might auto-approve high-confidence findings but flag medium- and low-confidence ones for manual verification.
### Scaling and reliability
Production deployments face operational constraints that proof-of-concept projects ignore.
**Rate limits**: Parallel Search API allows 600 requests per minute. Build backoff logic that respects limits and retries with exponential delays.
**Cost management**: Monitor usage against budgets. Choose processor tiers that match task complexity. A simple lookup doesn't need the ultra tier.
**Error handling** APIs fail and networks time out. Build graceful degradation so your agent continues operating when individual requests fail.
**Latency optimization**: Use async processing for long-running tasks. Cache results where freshness requirements allow. Stream progress updates for better user experience. Task API supports SSE streaming for real-time progress on long-running research tasks.
### Enterprise requirements
Enterprise deployments require compliance and security guarantees.
**SOC 2 Type 2 certification**: Required for handling sensitive data in regulated industries. Parallel maintains SOC 2 Type 2 certification.
**Data retention policies**: Understand what providers store and for how long. Parallel offers zero data retention on Enterprise plans.
**No training on customer data**: Your queries and results shouldn't improve competitor products. Parallel does not train on customer data.
**Audit trails**: Logging and traceability support compliance requirements. Track which queries produced which outputs, when, and for whom.
## FAQ
### What programming languages can I use to build an AI agent?
Python dominates due to strong LLM library support[LLM library support] from LangChain[LangChain], LlamaIndex[LlamaIndex], and the OpenAI SDK[OpenAI SDK]. TypeScript and JavaScript work well for web-native applications. Parallel offers SDKs for both Python and TypeScript.
### How much does it cost to run a web-capable AI agent?
Costs depend on query volume and task complexity. Parallel Search API starts at $1 per 1,000 requests with Turbo mode (~200ms median latency); Basic and Advanced modes cost $5 per 1,000 requests (10 results included). Extract API costs $1 per 1,000 URLs. Task API ranges from $5 to $2,400 per 1,000 runs depending on processor tier. Monitor API costs $3 per 1,000 executions.
### Can AI agents access any website?
Agents can access public web content. Some sites block automated access through CAPTCHAs, rate limits, or bot detection. Purpose-built APIs handle these obstacles better than DIY scrapers. Respect robots.txt and terms of service for ethical access.
### How do I prevent my AI agent from hallucinating?
Ground responses in retrieved content and require source citations for every claim. Use confidence scoring to flag uncertain outputs, and cross-reference critical facts across multiple sources. Parallel's Basis framework provides attribution and confidence scoring by default.
Parallel's documentation covers authentication, code examples, and interactive playgrounds for each API.
By Parallel
September 26, 2026