Making requests

There are five ways in which you can send GET requests to scraper.io: Via our Async Scraper service http://async.scraper.io.com Via our API endpoint http://api.scraper.io.com? Via one of our SDKs (only available for some programming languages) Via our proxy port http://scraper.io:APIKEY@proxy-server.scraper.io.com:8001 Via our Structured Data service https://api.scraper.io.com/structured/

Using the API endpoint

Before making your first API request, you need to pick which API client you will use. In addition to good ol' cURL HTTP requests, Protocol offers clients for JavaScript, Python, and PHP. In the following example, you can see how to install each client.

# cURL is most likely already installed on your machine
curl --version

Proxy port method

After picking your preferred client, you are ready to make your first call to the Protocol API. Below, you can see how to send a GET request to the Conversations endpoint to get a list of all your conversations. In the cURL example, results are limited to ten conversations, the default page length for each client.

GET
/v1/conversations
curl -G https://api.protocol.chat/v1/conversations \
  -H "Authorization: Bearer {token}" \
  -d limit=10

The Async Method

Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the Protocol API:

Was this page helpful?