POST, PUT & PATCH Requests

WebScrapingAPI is not limited to GET requests. You can now easily scrape the internet by sending POST, PUT or PATCH requests as well.

Currently in BETA version, the POST, PUT and PATCH requests are sent to the same base API URL. The only requirement for such requests is to pass the data (payload) alongside your request.

As you will see in the examples below, the only difference in implementation between the three is the HTTP method used. Apart from that, both requests are similar with respect to the endpoint and parameters passed.

POST Request Integration Example

Basic POST Request

POST https://api.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&url=https://httpbin.org/post

Please make sure to update <YOUR_API_KEY> with your own API key. Find out how to obtain an API key.

Query Parameters

Name
Type
Description

api_key

String

<YOUR_API_KEY>

url

String

https://httpbin.org/post/

Request Body

Name
Type
Description

foo

Any

bar

{
    "args": {},
    "data": "",
    "files": {},
    "form": {
        "foo": "bar"
    },
    "headers": {
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "Accept-Encoding": "gzip, deflate, br",
        "Content-Length": "161",
        "Content-Type": "multipart/form-data; boundary=--------------------------278908300530745447596209",
        "Cookie": "_ym_d=1662526544; _ym_uid=1662526544185865588; _sp_id.d61c=748a9bc6-a5c7-4150-8fd0-414c0f2bfef5.1662526544.1.1662526544..929d5975-1989-4385-86c9-58f4912eae17....0; _sp_ses.d61c=*; _dc_gtm_UA-1873769-1=1; _ga=GA1.2.2035572845.1662526542; _gid=GA1.2.1990048789.1662526542; MVID_ENVCLOUD=prod2; MVID_SMART_BANNER_BOTTOM=true; CACHE_INDICATOR=false; COMPARISON_INDICATOR=false; JSESSIONID=QpTvjYkL9QXSgpwGw4QZhJ8K8J8Gpdm1kJJXw0KG0j1b2xXhN7pJ!1498067355; MVID_CITY_ID=CityCZ_975; MVID_KLADR_ID=7700000000000; MVID_REGION_ID=1; MVID_REGION_SHOP=S002; MVID_TIMEZONE_OFFSET=3; bIPs=2105588670; flacktory=no; MVID_AB_SERVICES_DESCRIPTION=var2; MVID_BLACK_FRIDAY_ENABLED=true; MVID_CART_AVAILABILITY=true; MVID_CATALOG_STATE=1; MVID_CREDIT_AVAILABILITY=true; MVID_FILTER_CODES=true; MVID_FILTER_TOOLTIP=1; MVID_FLOCKTORY_ON=true; MVID_GIFT_KIT=true; MVID_HANDOVER_SUMMARY=true; MVID_IS_NEW_BR_WIDGET=true; MVID_LAYOUT_TYPE=1; MVID_LP_SOLD_VARIANTS=1; MVID_MCLICK=true; MVID_MINDBOX_DYNAMICALLY=true; MVID_MINI_PDP=true; MVID_MOBILE_FILTERS=true; MVID_NEW_ACCESSORY=true; MVID_NEW_DESKTOP_FILTERS=true; MVID_NEW_LK_CHECK_CAPTCHA=true; MVID_NEW_LK_OTP_TIMER=true; MVID_NEW_MBONUS_BLOCK=true; MVID_PROMO_CATALOG_ON=true; MVID_SERVICES=111; MVID_SERVICES_MINI_BLOCK=var2; MVID_WEBP_ENABLED=true; SENTRY_ERRORS_RATE=0.1; SENTRY_TRANSACTIONS_RATE=0.5; HINTS_FIO_COOKIE_NAME=2; MVID_ADDRESS_COMMENT_AB_TEST=2; MVID_CALC_BONUS_RUBLES_PROFIT=false; MVID_CART_MULTI_DELETE=false; MVID_GEOLOCATION_NEEDED=true; MVID_GET_LOCATION_BY_DADATA=DaData; MVID_GUEST_ID=21402680884; MVID_TAXI_DELIVERY_INTERVALS_VIEW=new; NEED_REQUIRE_APPLY_DISCOUNT=true; PICKUP_SEAMLESS_AB_TEST=2; PRESELECT_COURIER_DELIVERY_FOR_KBT=true; PROMOLISTING_WITHOUT_STOCK_AB_TEST=2; searchType2=2; __lhash_=c8f8689df5f9f7ae2c2b1ff6ad376902; __hash_=faf9a07c2b595ee1d591322e71aecc95; __cap_=a193bd59f0e68a94f271a1413394835d; __cap_p_=1,0",
        "Host": "httpbin.org",
        "Upgrade-Insecure-Requests": "1",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36",
        "X-Amzn-Trace-Id": "Root=1-631b49ae-46b3c01b43d6982d4826fca3"
    },
    "json": null,
    "origin": "192.3.214.227",
    "url": "https://httpbin.org/post"
}
curl --request POST --url "https://api.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fhttpbin.org%2Fpost" --data '{"foo": "bar"}'

PUT Request Integration Example

Basic PUT Request

PUT https://api.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&url=https://httpbin.org/put

Please make sure to update <YOUR_API_KEY> with your own API key. Find out how to obtain an API key.

Query Parameters

Name
Type
Description

api_key

String

<YOUR_API_KEY>

url

String

https://httpbin.org/put/

Request Body

Name
Type
Description

foo

Any

bar

{
    "args": {},
    "data": "",
    "files": {},
    "form": {
        "foo": "bar"
    },
    "headers": {
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "Accept-Encoding": "gzip, deflate, br",
        "Content-Length": "161",
        "Content-Type": "multipart/form-data; boundary=--------------------------278908300530745447596209",
        "Cookie": "_ym_d=1662526544; _ym_uid=1662526544185865588; _sp_id.d61c=748a9bc6-a5c7-4150-8fd0-414c0f2bfef5.1662526544.1.1662526544..929d5975-1989-4385-86c9-58f4912eae17....0; _sp_ses.d61c=*; _dc_gtm_UA-1873769-1=1; _ga=GA1.2.2035572845.1662526542; _gid=GA1.2.1990048789.1662526542; MVID_ENVCLOUD=prod2; MVID_SMART_BANNER_BOTTOM=true; CACHE_INDICATOR=false; COMPARISON_INDICATOR=false; JSESSIONID=QpTvjYkL9QXSgpwGw4QZhJ8K8J8Gpdm1kJJXw0KG0j1b2xXhN7pJ!1498067355; MVID_CITY_ID=CityCZ_975; MVID_KLADR_ID=7700000000000; MVID_REGION_ID=1; MVID_REGION_SHOP=S002; MVID_TIMEZONE_OFFSET=3; bIPs=2105588670; flacktory=no; MVID_AB_SERVICES_DESCRIPTION=var2; MVID_BLACK_FRIDAY_ENABLED=true; MVID_CART_AVAILABILITY=true; MVID_CATALOG_STATE=1; MVID_CREDIT_AVAILABILITY=true; MVID_FILTER_CODES=true; MVID_FILTER_TOOLTIP=1; MVID_FLOCKTORY_ON=true; MVID_GIFT_KIT=true; MVID_HANDOVER_SUMMARY=true; MVID_IS_NEW_BR_WIDGET=true; MVID_LAYOUT_TYPE=1; MVID_LP_SOLD_VARIANTS=1; MVID_MCLICK=true; MVID_MINDBOX_DYNAMICALLY=true; MVID_MINI_PDP=true; MVID_MOBILE_FILTERS=true; MVID_NEW_ACCESSORY=true; MVID_NEW_DESKTOP_FILTERS=true; MVID_NEW_LK_CHECK_CAPTCHA=true; MVID_NEW_LK_OTP_TIMER=true; MVID_NEW_MBONUS_BLOCK=true; MVID_PROMO_CATALOG_ON=true; MVID_SERVICES=111; MVID_SERVICES_MINI_BLOCK=var2; MVID_WEBP_ENABLED=true; SENTRY_ERRORS_RATE=0.1; SENTRY_TRANSACTIONS_RATE=0.5; HINTS_FIO_COOKIE_NAME=2; MVID_ADDRESS_COMMENT_AB_TEST=2; MVID_CALC_BONUS_RUBLES_PROFIT=false; MVID_CART_MULTI_DELETE=false; MVID_GEOLOCATION_NEEDED=true; MVID_GET_LOCATION_BY_DADATA=DaData; MVID_GUEST_ID=21402680884; MVID_TAXI_DELIVERY_INTERVALS_VIEW=new; NEED_REQUIRE_APPLY_DISCOUNT=true; PICKUP_SEAMLESS_AB_TEST=2; PRESELECT_COURIER_DELIVERY_FOR_KBT=true; PROMOLISTING_WITHOUT_STOCK_AB_TEST=2; searchType2=2; __lhash_=c8f8689df5f9f7ae2c2b1ff6ad376902; __hash_=faf9a07c2b595ee1d591322e71aecc95; __cap_=a193bd59f0e68a94f271a1413394835d; __cap_p_=1,0",
        "Host": "httpbin.org",
        "Upgrade-Insecure-Requests": "1",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36",
        "X-Amzn-Trace-Id": "Root=1-631b49ae-46b3c01b43d6982d4826fca3"
    },
    "json": null,
    "origin": "192.3.214.227",
    "url": "https://httpbin.org/post"
}
curl --request PUT --url "https://api.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&url=https%3A%2F%2Fhttpbin.org%2Fput" --data '{"foo": "bar"}'

PATCH Request Integration Example

Basic PATCH Request

PATCH https://api.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&url=https://reqres.in/api/users/2

Please make sure to update <YOUR_API_KEY> with your own API key. Find out how to obtain an API key.

Query Parameters

Name
Type
Description

api_key

String

<YOUR_API_KEY>

Request Body

Name
Type
Description

foo

Any

bar

{
  "{foo: bar}": "",
  "updatedAt": "2024-07-09T06:47:34.063Z",
  "headers": {
    "date": "Tue, 09 Jul 2024 06:47:34 GMT",
    "content-type": "application/json; charset=utf-8",
    "transfer-encoding": "chunked",
    "connection": "keep-alive",
    "report-to": "{\"group\":\"heroku-nel\",\"max_age\":3600,\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?ts=1720507654&sid=c4c9725f-1ab0-44d8-820f-430df2718e11&s=DM8%2BgbKWbQsKLgdybhmThpAaNqhBTu5jphWoRDmYLag%3D\"}]}",
    "reporting-endpoints": "heroku-nel=https://nel.heroku.com/reports?ts=1720507654&sid=c4c9725f-1ab0-44d8-820f-430df2718e11&s=DM8%2BgbKWbQsKLgdybhmThpAaNqhBTu5jphWoRDmYLag%3D",
    "nel": "{\"report_to\":\"heroku-nel\",\"max_age\":3600,\"success_fraction\":0.005,\"failure_fraction\":0.05,\"response_headers\":[\"Via\"]}",
    "x-powered-by": "Express",
    "access-control-allow-origin": "*",
    "etag": "W/\"38-xYucJZPnCu7IZXf4Jiw0lCr7Qkg\"",
    "via": "1.1 vegur",
    "cf-cache-status": "DYNAMIC",
    "server": "cloudflare",
    "cf-ray": "8a065d054ede9932-ARN",
    "content-encoding": "br"
  }
}
curl --request PATCH --url "https://api.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&url=https://reqres.in/api/users/2" --data '{"foo": "bar"}'

Last updated