Agent examples
Find pricing
Pricing extraction
```bash
curl https://api.faircompany.ai/v1/crawl/agent \
-X POST \
-H "Authorization: Bearer fc_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"instruction": "Find Stripe's current standard card pricing and return the answer with sources.",
"max_steps": 6,
"budget_usd": 0.05
}'
```
```ts
const answer = await fc.agent({
instruction: "Find Stripe's current standard card pricing and return the answer with sources.",
max_steps: 6,
budget_usd: 0.05,
});
console.log(answer.answer);
console.log(answer.sources);
```
```python
answer = fc.agent(
"Find Stripe's current standard card pricing and return the answer with sources.",
max_steps=6,
budget_usd=0.05,
)
print(answer.answer)
print(answer.sources)
```
```json
{
"tool": "faircrawl_agent",
"arguments": {
"instruction": "Find Stripe's current standard card pricing and return the answer with sources.",
"max_steps": 6,
"budget_usd": 0.05
}
}
```
Return JSON
Structured comparison
```bash
curl https://api.faircompany.ai/v1/crawl/agent \
-X POST \
-H "Authorization: Bearer fc_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"instruction": "Compare Notion and Confluence pricing for teams under 50 seats.",
"response_format": "json",
"json_schema": {
"type": "object",
"properties": {
"winner": { "type": "string" },
"notes": { "type": "array", "items": { "type": "string" } }
},
"required": ["winner", "notes"]
}
}'
```
```ts
const result = await fc.agent({
instruction: "Compare Notion and Confluence pricing for teams under 50 seats.",
response_format: "json",
json_schema: {
type: "object",
properties: {
winner: { type: "string" },
notes: { type: "array", items: { type: "string" } },
},
required: ["winner", "notes"],
},
});
console.log(result.answer);
```
```python
result = fc.agent(
"Compare Notion and Confluence pricing for teams under 50 seats.",
response_format="json",
json_schema={
"type": "object",
"properties": {
"winner": {"type": "string"},
"notes": {"type": "array", "items": {"type": "string"}},
},
"required": ["winner", "notes"],
},
)
print(result.answer)
```
```json
{
"tool": "faircrawl_agent",
"arguments": {
"instruction": "Compare Notion and Confluence pricing for teams under 50 seats.",
"response_format": "json",
"json_schema": {
"type": "object",
"properties": {
"winner": { "type": "string" },
"notes": { "type": "array", "items": { "type": "string" } }
},
"required": ["winner", "notes"]
}
}
}
```
Good tasks
- compare pricing or feature surfaces
- summarize a set of public sources with citations
- find a specific answer across docs and marketing pages