Documentation

Quickstart (Basic)

This page shows how to make a ScrapingAnt request with curl.

Before you begin

First of all you have to select preferable plan.

To try out our service you can select Basic plan and receive 100 free requests per month.

Making request

The curl command includes JSON with the url to be fetched (url), and the flag specifying return type (return_text). Here we will try to scrape https://example.com:
curl --request POST \
    --url https://scrapingant.p.rapidapi.com/post \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --header 'x-rapidapi-host: scrapingant.p.rapidapi.com' \
    --header 'x-rapidapi-key: RAPID_API_KEY' \
    --data '{ "url" : "https://example.com", "return_text" : false }' 
You should see a response similar to the following:
<!DOCTYPE html><html><head>
    <title>Example Domain</title>

    <meta charset="utf-8">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type="text/css">
    ...
    </style>    
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>


</body></html> 
If you don’t want to bother yourself with html tags, you can specify "return_text": true, and the result will be as following:
Example Domain

This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.

More information... 

Examples

Still have questions?

You can find more details about our API at ScrapingAnt RapidAPI page.

Or just reach us by support@scrapingant.com