├── code examples ├── adidas_curl.sh ├── adidas_python.py ├── adidas_nodejs.js ├── adidas_php.php ├── adidas_golang.go ├── adidas_csharp.cs └── adidas_java.java └── README.md /code examples/adidas_curl.sh: -------------------------------------------------------------------------------- 1 | curl --user user:pass \ 2 | 'https://realtime.oxylabs.io/v1/queries' \ 3 | -H "Content-Type: application/json" \ 4 | -d '{"source": "universal", "url": "https://www.adidas.com/us/under_100-shoes"}' -------------------------------------------------------------------------------- /code examples/adidas_python.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from pprint import pprint 3 | 4 | # Structure payload. 5 | payload = { 6 | 'source': 'universal', 7 | 'url': 'https://www.adidas.com/us/under_100-shoes' 8 | } 9 | 10 | # Get response. 11 | response = requests.request( 12 | 'POST', 13 | 'https://realtime.oxylabs.io/v1/queries', 14 | auth=('user', 'pass1'), 15 | json=payload, 16 | ) 17 | 18 | # Instead of response with job status and results url, this will return the 19 | # JSON response with the result. 20 | pprint(response.json()) -------------------------------------------------------------------------------- /code examples/adidas_nodejs.js: -------------------------------------------------------------------------------- 1 | import fetch from 'node-fetch'; 2 | 3 | const username = 'YOUR_USERNAME'; 4 | const password = 'YOUR_PASSWORD'; 5 | const body = { 6 | 'source': 'universal', 7 | 'url': 'https://www.adidas.com/us/under_100-shoes'}; 8 | 9 | const response = await fetch('https://realtime.oxylabs.io/v1/queries', { 10 | method: 'post', 11 | body: JSON.stringify(body), 12 | headers: { 13 | 'Content-Type': 'application/json', 14 | 'Authorization': 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64'), 15 | } 16 | }); 17 | 18 | console.log(await response.json()); -------------------------------------------------------------------------------- /code examples/adidas_php.php: -------------------------------------------------------------------------------- 1 | 'universal', 5 | 'url' => 'https://www.adidas.com/us/under_100-shoes']; 6 | 7 | $ch = curl_init(); 8 | 9 | curl_setopt($ch, CURLOPT_URL, "https://realtime.oxylabs.io/v1/queries"); 10 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 11 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 12 | curl_setopt($ch, CURLOPT_POST, 1); 13 | curl_setopt($ch, CURLOPT_USERPWD, "user" . ":" . "pass1"); 14 | 15 | $headers = array(); 16 | $headers[] = "Content-Type: application/json"; 17 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 18 | 19 | $result = curl_exec($ch); 20 | echo $result; 21 | 22 | if (curl_errno($ch)) { 23 | echo 'Error:' . curl_error($ch); 24 | } 25 | curl_close ($ch); 26 | ?> -------------------------------------------------------------------------------- /code examples/adidas_golang.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "fmt" 7 | "io/ioutil" 8 | "net/http" 9 | ) 10 | 11 | func main() { 12 | const Username = "YOUR_USERNAME" 13 | const Password = "YOUR_PASSWORD" 14 | 15 | payload := map[string]string{ 16 | "source": "universal", 17 | "url": "https://www.adidas.com/us/under_100-shoes", 18 | } 19 | 20 | jsonValue, _ := json.Marshal(payload) 21 | 22 | client := &http.Client{} 23 | request, _ := http.NewRequest("POST", 24 | "https://realtime.oxylabs.io/v1/queries", 25 | bytes.NewBuffer(jsonValue), 26 | ) 27 | 28 | request.SetBasicAuth(Username, Password) 29 | response, _ := client.Do(request) 30 | 31 | responseText, _ := ioutil.ReadAll(response.Body) 32 | fmt.Println(string(responseText)) 33 | } -------------------------------------------------------------------------------- /code examples/adidas_csharp.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net.Http; 4 | using System.Net.Http.Json; 5 | using System.Threading.Tasks; 6 | 7 | namespace OxyApi 8 | { 9 | class Program 10 | { 11 | static async Task Main() 12 | { 13 | const string Username = "YOUR_USERNAME"; 14 | const string Password = "YOUR_PASSWORD"; 15 | 16 | var parameters = new Dictionary() 17 | { 18 | { "source", "universal" }, 19 | { "url", "https://www.adidas.com/us/under_100-shoes"}, 20 | } 21 | 22 | 23 | var client = new HttpClient(); 24 | 25 | Uri baseUri = new Uri("https://realtime.oxylabs.io"); 26 | client.BaseAddress = baseUri; 27 | 28 | var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries"); 29 | requestMessage.Content = JsonContent.Create(parameters); 30 | 31 | var authenticationString = $"{Username}:{Password}"; 32 | var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString)); 33 | requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString); 34 | 35 | var response = await client.SendAsync(requestMessage); 36 | var contents = await response.Content.ReadAsStringAsync(); 37 | 38 | Console.WriteLine(contents); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /code examples/adidas_java.java: -------------------------------------------------------------------------------- 1 | import okhttp3.*; 2 | import org.json.JSONObject; 3 | 4 | public class Main implements Runnable { 5 | private static final String AUTHORIZATION_HEADER = "Authorization"; 6 | public static final String USERNAME = "YOUR_USERNAME"; 7 | public static final String PASSWORD = "YOUR_PASSWORD"; 8 | 9 | public void run() { 10 | JSONObject jsonObject = new JSONObject(); 11 | jsonObject.put("source", "universal"); 12 | jsonObject.put("url", "https://www.adidas.com/us/under_100-shoes"); 13 | 14 | Authenticator authenticator = (route, response) -> { 15 | String credential = Credentials.basic(USERNAME, PASSWORD); 16 | 17 | return response 18 | .request() 19 | .newBuilder() 20 | .header(AUTHORIZATION_HEADER, credential) 21 | .build(); 22 | }; 23 | 24 | var client = new OkHttpClient.Builder() 25 | .authenticator(authenticator) 26 | .build(); 27 | 28 | var mediaType = MediaType.parse("application/json; charset=utf-8"); 29 | var body = RequestBody.create(jsonObject.toString(), mediaType); 30 | var request = new Request.Builder() 31 | .url("https://realtime.oxylabs.io/v1/queries") 32 | .post(body) 33 | .build(); 34 | 35 | try (var response = client.newCall(request).execute()) { 36 | assert response.body() != null; 37 | System.out.println(response.body().string()); 38 | } catch (Exception exception) { 39 | System.out.println("Error: " + exception.getMessage()); 40 | } 41 | 42 | System.exit(0); 43 | } 44 | 45 | public static void main(String[] args) { 46 | new Thread(new Main()).start(); 47 | } 48 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Adidas Scraper API 2 | 3 | [![Oxylabs promo code](https://raw.githubusercontent.com/oxylabs/product-integrations/refs/heads/master/Affiliate-Universal-1090x275.png)](https://oxylabs.io/pages/gitoxy?utm_source=877&utm_medium=affiliate&groupid=877&utm_content=adidas-scraper-github&transaction_id=102f49063ab94276ae8f116d224b67) 4 | 5 | [![](https://dcbadge.limes.pink/api/server/Pds3gBmKMH?style=for-the-badge&theme=discord)](https://discord.gg/Pds3gBmKMH) [![YouTube](https://img.shields.io/badge/YouTube-Oxylabs-red?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@oxylabs) 6 | 7 | Oxylabs’ [Adidas Scraper](https://oxylabs.io/products/scraper-api/ecommerce/adidas?utm_source=github&utm_medium=repositories&utm_campaign=product) is a data gathering solution allowing you to extract real-time information from an Adidas website effortlessly. This brief guide explains how an Adidas Scraper works and provides code examples to understand better how you can use it hassle-free. 8 | 9 | ### How it works 10 | 11 | You can get Adidas results by providing your own URLs to our service. We can return the HTML for any Adidas page you like. 12 | 13 | #### Python code example 14 | 15 | The example below illustrates how you can get HTML of Adidas page. 16 | 17 | ```python 18 | import requests 19 | from pprint import pprint 20 | 21 | # Structure payload. 22 | payload = { 23 | 'source': 'universal', 24 | 'url': 'https://www.adidas.com/us/under_100-shoes' 25 | } 26 | 27 | # Get response. 28 | response = requests.request( 29 | 'POST', 30 | 'https://realtime.oxylabs.io/v1/queries', 31 | auth=('user', 'pass1'), 32 | json=payload, 33 | ) 34 | 35 | # Instead of response with job status and results url, this will return the 36 | # JSON response with the result. 37 | pprint(response.json()) 38 | ``` 39 | Find code examples for other programming languages [**here**](https://github.com/oxylabs/adidas-scraper/tree/main/code%20examples) 40 | 41 | #### Output Example 42 | ```json 43 | { 44 | "results": [ 45 | { 46 | "content": "", 47 | "created_at": "2023-12-18 10:26:29", 48 | "updated_at": "2023-12-18 10:26:32", 49 | "page": 1, 50 | "url": "https://www.adidas.com/us/under_100-shoes", 51 | "job_id": "7142460105970199553", 52 | "status_code": 200 53 | } 54 | ] 55 | } 56 | ``` 57 | With our Adidas Scraper, you can conveniently pull public data from any Adidas web page. Gather the necessary product details, such as sports apparel pricing, customer feedback, or athletic footwear descriptions, to examine the marketplace and maintain a competitive edge. If you need help, reach out to our support team through live chat or send us an email at hello@oxylabs.io. 58 | --------------------------------------------------------------------------------