Web - my GraphQL request getting 403 error

106 views Asked by At

I'm trying to scrap info from https://stockx.com/ using their API

It have been working previously but now I am getting 403 error, but the point is that my mate is also getting the same error from the script however he didnt use that script previously

I have copied my headers from developers console by getting info from https://stockx.com/air-jordan-1-low-se-craft-tech-grey

I am not sure if I changed something in script or I am getting blocked by cloudfare , do you have any ideas how I can bypass this problem using requests ? Maybe you have worked on the same issues.

Thnaks in advance

I have used the following request

Request URL: https://stockx.com/api/p/e

Request:

{"query":"query GetMarketData($id: String!, $currencyCode: CurrencyCode, $countryCode: String!, $marketName: String) {\n product(id: $id) {\n id\n urlKey\n title\n uuid\n contentGroup\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n salesInformation {\n lastSale\n salesLast72Hours\n }\n }\n variants {\n id\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n salesInformation {\n lastSale\n salesLast72Hours\n }\n }\n }\n ...BidButtonFragment\n ...BidButtonContentFragment\n ...BuySellFragment\n ...BuySellContentFragment\n ...XpressAskPDPFragment\n ...LastSaleFragment\n }\n}\n\nfragment BidButtonFragment on Product {\n id\n title\n urlKey\n sizeDescriptor\n productCategory\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n }\n media {\n imageUrl\n }\n variants {\n id\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n }\n }\n}\n\nfragment BidButtonContentFragment on Product {\n id\n urlKey\n sizeDescriptor\n productCategory\n lockBuying\n lockSelling\n minimumBid(currencyCode: $currencyCode)\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n numberOfAsks\n }\n }\n variants {\n id\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n numberOfAsks\n }\n }\n }\n}\n\nfragment BuySellFragment on Product {\n id\n title\n urlKey\n sizeDescriptor\n productCategory\n lockBuying\n lockSelling\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n }\n media {\n imageUrl\n }\n variants {\n id\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n }\n }\n}\n\nfragment BuySellContentFragment on Product {\n id\n urlKey\n sizeDescriptor\n productCategory\n lockBuying\n lockSelling\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n }\n variants {\n id\n market(currencyCode: $currencyCode) {\n bidAskData(country: $countryCode, market: $marketName) {\n highestBid\n highestBidSize\n lowestAsk\n lowestAskSize\n }\n }\n }\n}\n\nfragment XpressAskPDPFragment on Product {\n market(currencyCode: $currencyCode) {\n state(country: $countryCode) {\n numberOfCustodialAsks\n }\n }\n variants {\n market(currencyCode: $currencyCode) {\n state(country: $countryCode) {\n numberOfCustodialAsks\n }\n }\n }\n}\n\nfragment LastSaleFragment on Product {\n id\n market(currencyCode: $currencyCode) {\n statistics(market: $marketName) {\n ...LastSaleMarketStatistics\n }\n }\n variants {\n id\n market(currencyCode: $currencyCode) {\n statistics(market: $marketName) {\n ...LastSaleMarketStatistics\n }\n }\n }\n}\n\nfragment LastSaleMarketStatistics on MarketStatistics {\n lastSale {\n amount\n changePercentage\n changeValue\n sameFees\n }\n}","variables":{"id":"air-jordan-1-low-se-craft-tech-grey","currencyCode":"USD","countryCode":"US","marketName":"US"},"operationName":"GetMarketData"}

0

There are 0 answers