
Boulanger
Deprecated
Pricing
$100.00/month + usage

Boulanger
Deprecated
Extract information from boulanlger : simply provide your search URL (+ your filters and location). You will get the results easy, and fast
0.0 (0)
Pricing
$100.00/month + usage
1
Total users
6
Monthly users
1
Last modified
a year ago
You can access the Boulanger programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "startUrls": [{ "url": "https://www.boulanger.com/resultats?tr=samsung" }],10 "pageFunction": """async function pageFunction(context) {11 let data = {}12 let userData = context.request.userData13 data.url = context.request.url14 data.label = userData.label15
16 let items = await context.page.evaluate(() => {17 const item = $('.product-item')18 // const item = $('.rm-product')19 const itemInfo = item.map(function(i,elem) {20 let obj = {}21 obj.title = $(this).find('h2').text()22 obj.sponsored = false23 obj.price = $(this).find('.price__amount').text()24 obj.img = $(this).find('img').attr('src')25 obj.rank = i+126 return obj27 }).get()28
29 const itemSponsored = $('.rm-product')30 const itemInfoSponsored = itemSponsored.map(function(i,elem) {31 let obj = {}32 obj.title = $(this).find('h2').text()33 obj.sponsored = true34 obj.price = $(this).find('.rm_price').text()35 obj.img = $(this).find('img').attr('src')36 obj.rank = i+137 return obj38 }).get()39
40 // return [...itemInfo,...itemInfoSponsored]41 const allitems = itemInfoSponsored.concat(itemInfo)42 return allitems43 })44 45 let itemsWithDataProp = items.map(obj => { 46 for(const key of Object.keys(data) ){47 obj[key] = data[key]48 }49 return obj50 })51 return itemsWithDataProp;52}53""",54 "proxyConfiguration": {55 "useApifyProxy": True,56 "apifyProxyGroups": ["RESIDENTIAL"],57 "apifyProxyCountry": "FR",58 },59}60
61# Run the Actor and wait for it to finish62run = client.actor("anchor/boulanger").call(run_input=run_input)63
64# Fetch and print Actor results from the run's dataset (if there are any)65print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])66for item in client.dataset(run["defaultDatasetId"]).iterate_items():67 print(item)68
69# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
Boulanger API in Python
The Apify API client for Python is the official library that allows you to use Boulanger API in Python, providing convenience functions and automatic retries on errors.
Install the apify-client
$pip install apify-client
Other API clients include: