Click here to Skip to main content
15,878,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SO I need to do some SERPing and decided to use https://www.serphouse.com/

on that link there there is an example demo , i need t0 implement that code into my c# program. which should theoretically take links found by SERPHOUSE and finds the HTML of each website linked
underneath the demo part there is different languages they have written it in , but if you make a free account it gives C# restsharp code which i have no idea what it does , i think it extracts the HTML of the given website

Successfult request 
var client = new RestClient("https://api.serphouse.com/serp/live");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer 39VIQbPC7TJh0SSxIB7pkbcEl6qS6ILSFMooJuAcEUjEo8EsVHZLa3ZBlXZ9");
request.AddParameter("application/json", "{\n\t\"data\":\n\t\t{\n\t\t\t\"domain\":\"google.co.uk\",\n\t\t\t\"lang\":\"en\",\n\t\t\t\"q\": \"Coffe Shops\",\n\t\t\t\"loc\":\"Aarau,Aargau,Switzerland\",\n\t\t\t\"device\": \"desktop\",\n\t\t\t\"serp_type\": \"web\"\n\t\t}\n}",  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);



but this is not the same code that is given on the demo on the main page (the link above)

so i was wondering if anybody could help me figure out what i would need to do to get results like they show in the demo but in C#

What I have tried:

fOLLOWING THE TUTORIAL
Java to C# converters --- horrible ideas
Posted
Updated 2-Jan-20 1:25am
v5
Comments
ZurdoDev 1-Jan-20 22:48pm    
Sorry, can't help you. It looks like OriginalGriff removed links to the API that you were using.
Kornfeld Eliyahu Peter 2-Jan-20 3:18am    
It is SERP API - hope it helps :-)
OriginalGriff 2-Jan-20 7:57am    
"how is anyone supposed to help when the links are removed. face palm"

Yes, I took the links out, since it looks like spam for a paid for service and it came up in moderation. And given his lack of response in the last nine hours, I suspect I was right and you have done his work for him ... :laugh:
ZurdoDev 2-Jan-20 8:16am    
How does it look like spam? It's a valid question (sort of, the question isn't very clear) and the user has other valid questions.

If you thought it was spam, why didn't you delete the message?
OriginalGriff 2-Jan-20 8:25am    
Because I wasn't *positive* it was, for the very reasons you mention.
And when we kick a spammer off, they don't get the account back, so I like to be sure about these things.

Removing the "spam-like" stuff gives him a chance to say "why?" and get a sensible discussion going ... which he doesn't appear too interested in ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900