Parsera

Learn how to use Parsera with Composio

Overview

SLUG: PARSERA

Description

Parsera is a lightweight Python library for scraping websites using large language models (LLMs).

Authentication Details

generic_api_key
stringRequired

Connecting to Parsera

Create an auth config

Use the dashboard to create an auth config for the Parsera toolkit. This allows you to connect multiple Parsera accounts to Composio for agents to use.

1

Select App

Navigate to Parsera.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Parsera Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4parsera_auth_config_id = "ac_YOUR_PARSERA_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Parsera for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, parsera_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Parsera toolkit’s playground

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Extract Data from Webpage

Description

Tool to perform LLM-powered data extraction from a live webpage URL with specified attributes. Use when you need to extract structured data from web pages based on field descriptions.

Action Parameters

attributes
objectRequired
cookies
array
mode
stringDefaults to standard
prompt
string
proxy_country
stringDefaults to UnitedStates
url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Extract Markdown

Description

Tool to extract markdown content from a file or URL.

Action Parameters

file_path
string
url
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get LLM Specifications

Description

Tool to retrieve standardized LLM capabilities and pricing specifications. Use to get up-to-date information about models from various providers.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Proxy Countries

Description

Tool to retrieve the list of available proxy countries for web scraping requests. Use when you need to know which countries are supported for proxy-based scraping.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Health Check

Description

Tool to verify API availability and operational status. Use to check if the Parsera service is accessible before making other API calls.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Agents

Description

Tool to retrieve all available agents for the authenticated user. Use when you need to list agents that can be used for scraping tasks.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Scrapers

Description

Tool to list all templates and old scrapers for the authenticated user. Use when you need to retrieve available scraper configurations.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Parse Content

Description

Tool to extract structured data from raw HTML or text content using AI. Use when you have content already loaded and need to extract specific fields from it.

Action Parameters

attributes
objectRequired
content
stringRequired
mode
stringDefaults to standard
prompt
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove Agent

Description

Tool to delete an existing agent by name. Use when you need to remove a previously created agent from the Parsera platform.

Action Parameters

name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Run Scraper Template

Description

Tool to run a scraper template on a specified URL with optional proxy and cookies. Use when you need to execute a pre-defined scraper template to extract structured data from web pages.

Action Parameters

cookies
array
proxy_country
string
template_id
stringRequired
url
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Scrape With Agent

Description

Tool to run a previously generated scraper agent on a specific URL to extract structured data. Use when you need to apply an existing scraper to a webpage.

Action Parameters

cookies
array
name
stringRequired
proxy_country
string
url
stringRequired

Action Response

data
object
error
string
status
string
successful
booleanRequired
url
string