We’ve made it to the final day of Launch Week, and we’re wrapping up with our biggest product offering yet: the AgentQL REST API!
This simple API turns any page into an endpoint for content. With only a URL and a query string, you can query web pages and retrieve the same precise, structured data you have come to expect from our —even from dynamic content or complex websites. The possibilities are endless, from scheduling scraping jobs to building data pipelines, or even empowering AI agents to interact with the web in all new ways.
Like the demo? Get the !
What is the AgentQL REST API?
The AgentQL REST API allows you to send queries via HTTP to retrieve structured data from any publicly available website with a single request. This flexibility makes it a powerful tool for developers, automation experts, and AI agent providers working with dynamic data applications.
Use AgentQL with any programming language or tool that supports HTTP. By integrating with tools like Zapier or embedding it in backend systems, AgentQL’s REST API opens up new possibilities for automating large-scale data acquisition and training data collection. It’s an ideal solution for users who need the precision of AgentQL’s smart locators without the SDK setup—just plug in your query and get your data!
Unlock the Internet’s Data
There’s so much information available on the web that’s been dammed up in HTML soup. We get it. Not every organization can build an API to share their information. That’s why AgentQL was designed to do the heavy lifting for both publishers and consumers!
This REST API is for anyone looking to add fast, precise, structured data collection to their workflows. It’s handy for:
AI Agents: The REST API is a perfect match for autonomous AI agents that need to pull in real-world data dynamically. With AgentQL’s REST endpoint, agents can retrieve and interact with live data, making them more adaptable and versatile.
Web Scraping & Monitoring Applications: If your use case involves tracking product prices, following market trends, monitoring real estate listings, or scraping job boards, the REST API lets you automate it from one endpoint.
Developers & Data Engineers: Integrate AgentQL into your backend or data processing pipelines for efficient web scraping, analytics, and content retrieval.
Automation Experts & No-Code Users: Set up automated data flows in platforms like Zapier without needing extensive coding knowledge.
How to Get Started with the AgentQL REST API
Get your API key: Every request requires an X-API-Key header. .
{
"url": "https://scrapeme.live/shop",
"query": "{ products[] { product_name product_price } }"
}
Set your headers: Before making the API request, include the necessary headers for authentication and content type. These headers authorize the request and specify the data format being sent.
X-API-Key: use your AgentQL API key for authentication.
Content-Type: useapplication/jsonto indicate that the request body is in JSON format, allowing the server to interpret the data correctly.
Send the Request: Use your preferred HTTP client (like curl, Postman, or an HTTP library in Python or your preferred language) to make aPOSTrequest to the AgentQL REST API endpoint.
curl -X POST "https://api.agentql.com/v1/query-data" \
-H "X-API-Key: $AGENTQL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://scrapeme.live/?s=fish&post_type=product",
"query": "{ products[] { product_name product_price } }"
}'
(Make sure to replace $AGENTQL_API_KEY with your actual
Thank you for being part of AgentQL Launch Week! We're working hard to make sure AgentQL is your favorite tool for automation and data retrieval. Please let us know what you think—take our survey!
Happy coding and automating!
—The Tiny Fish Team Building AgentQL
SOCIAL SHARE CARD GENERATOR