Why Scrape SNCF Connect ?

SNCF Connect is a leading platform for train travel in France, offering a wide range of travel options from regional to international routes. For businesses in the travel and transportation industries, scraping data from SNCF Connect can provide valuable insights into pricing, travel schedules, seat availability, and customer demand. This information can guide strategic decisions, from route planning to pricing and marketing.

Moreover, SNCF Connect's online presence makes it a treasure trove of data. By scraping this data, businesses and researchers can analyze trends in the travel market, understand customer preferences, and predict future demand. Additionally, by monitoring the prices on SNCF Connect, businesses can identify pricing errors and take advantage of them to save costs.

An important aspect to consider while scraping SNCF Connect is the presence of an anti-bot mechanism, specifically DataDome, deployed on the site to prevent automated data extraction. However, this shouldn't deter your data extraction efforts. Autom.dev is equipped with a sophisticated technology capable of bypassing these anti-bot protections like DataDome, allowing you to scrape data from SNCF Connect seamlessly.

What Will We Scrape ?

We will scrape the following product data from SNCF Connect:

  • Best Price
  • Departure Information (Origin Station, Time, Date)
  • Duration
  • First Comfort Class Offers
  • Services Included in the Offer
  • Transporters Fare Conditions

Example for Scraping Product Data from SNCF Connect

Request :

curl --location --request GET 'https://autom.dev/api/v1/sncf/product?query=https://www.sncf-connect.com/app/home/shop/results/outward' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <token>'
curl --location --request GET 'https://autom.dev/api/v1/sncf/product?query=https://www.sncf-connect.com/app/home/shop/results/outward' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <token>'

Response :

{
  "dateLabel": "Jeu. 25 mai",
  "destinationStationLabel": "Paris Gare De Lyon",
  "displayDisabilityAssistance": false,
  "timeLabel": "16:12",
  "bestPriceLabel": "76 €",
  "bestPriceLabelPrefix": "dès",
  "departure": {
    "originStationLabel": "Lyon Part Dieu",
    "timeLabel": "14:04",
    "dateLabel": "Aller : Jeu. 25 mai"
  },
  "durationLabel": "2h08",
  "firstComfortClassOffers": {
    "title": "1re classe",
    "bestPriceLabel": "89 €",
    "bestPriceLabelPrefix": "dès",
    "infoPriceLabel": "2 places à ce prix"
  },
  "services": {
    "title": "Nos services en 1re",
    "services": [
      {
        "label": "Bagages inclus"
      },
      {
        "label": "Prise électrique individuelle"
      },
      {
        "label": "Presse et contenus sur le Portail TGV INOUI"
      },
      {
        "label": "Confort de la 1re"
      },
      {
        "label": "Choix de la place"
      }
    ]
  },
  "title": "Modifiable sous conditions",
  "transportersFareConditions": [],
  "travelersFares": [
    {
      "id": "...",
      "priceLabel": "89 €",
      "subtitles": ["PREMIERE"],
      "travelerDescription": "30 - 59 ans",
      "travelerIcon": "TRAVELER",
      "type": "NORMAL"
    }
  ],
  "title": "1re classe",
  "globalTimeline": {
    "steps": [
      {
        "onBoarding": {
          "onBoardingLabel": "Accueil embarquement jusqu'à 2 min avant le départ",
          "onBoardingTimeLabel": "14:02"
        }
      },
      {
        "train": {
          "departure": {
            "stationCode": "",
            "stationLabel": "Lyon Part Dieu",
            "timeLabel": "14:04"
          }
        }
      }
    ]
  }
}
{
  "dateLabel": "Jeu. 25 mai",
  "destinationStationLabel": "Paris Gare De Lyon",
  "displayDisabilityAssistance": false,
  "timeLabel": "16:12",
  "bestPriceLabel": "76 €",
  "bestPriceLabelPrefix": "dès",
  "departure": {
    "originStationLabel": "Lyon Part Dieu",
    "timeLabel": "14:04",
    "dateLabel": "Aller : Jeu. 25 mai"
  },
  "durationLabel": "2h08",
  "firstComfortClassOffers": {
    "title": "1re classe",
    "bestPriceLabel": "89 €",
    "bestPriceLabelPrefix": "dès",
    "infoPriceLabel": "2 places à ce prix"
  },
  "services": {
    "title": "Nos services en 1re",
    "services": [
      {
        "label": "Bagages inclus"
      },
      {
        "label": "Prise électrique individuelle"
      },
      {
        "label": "Presse et contenus sur le Portail TGV INOUI"
      },
      {
        "label": "Confort de la 1re"
      },
      {
        "label": "Choix de la place"
      }
    ]
  },
  "title": "Modifiable sous conditions",
  "transportersFareConditions": [],
  "travelersFares": [
    {
      "id": "...",
      "priceLabel": "89 €",
      "subtitles": ["PREMIERE"],
      "travelerDescription": "30 - 59 ans",
      "travelerIcon": "TRAVELER",
      "type": "NORMAL"
    }
  ],
  "title": "1re classe",
  "globalTimeline": {
    "steps": [
      {
        "onBoarding": {
          "onBoardingLabel": "Accueil embarquement jusqu'à 2 min avant le départ",
          "onBoardingTimeLabel": "14:02"
        }
      },
      {
        "train": {
          "departure": {
            "stationCode": "",
            "stationLabel": "Lyon Part Dieu",
            "timeLabel": "14:04"
          }
        }
      }
    ]
  }
}