AutoScout24 API
Integrate the AutoScout24 search into your applications free of charge.

Autoscout24 API Demo

Please login to use the Autoscout24 Demo

How it works

  1. try{
  2. $vehicle_search_parameters->setAddress(new VehicleSearchParametersAddress(
  3. new VehicleSearchParametersAddressCountries($country_array),
  4. null, null, null));
  5.  
  6. $vehicle_search_parameters->setBrands(new VehicleSearchParametersBrands
  7. ($brand_arry);
  8. $vehicle_search_parameters->setModels(new VehicleSearchParametersModels
  9. ($model_array);
  10. //keep going on like this------
  11. $searchParams = new SearchParameters($culture_key, $vehicle_search_parameters);
  12. $find_articles_response = $client->findArticles($searchParams);
  13.  
  14. if(!($find_articles_response->getStatus()->getStatusConstant() == AutoScout24StatusConstants::SUCCESS)) {
  15. $errorMessage = "The invocation of getLookUpData() was not successful.\n";
  16. $errorMessage .= "The error code is: ".$find_articles_response->getStatus()->getStatusCode()."\n";
  17. $errorMessage .= "The error message is: ".$find_articles_response->getStatus()->getStatusMessage()."\n";
  18. $errorMessage .= "The error description is: ".$find_articles_response->getStatus()->getStatusDescriptionGerman();
  19. throw new Exception ($errorMessage);
  20. }
  21. $myVehicles = $findArticlesResponse->getVehicles()->getVehicle();
  22. foreach($myVehicles as $vehicle){
  23. //get Id's of values to get the full Text
  24. $carBrandId = $car->getBrandId();
  25. .
  26. .
  27. .
  28. print $carBrand;
  29. }
  30.  
  31. }catch(Exception $e){
  32. $this->exceptionText = $e->getMessage();
  33.  
  34. }