Question: I am a developer and I work for a start up. My boss assigned me a task of checking two career-related networking sites. I need to programmatically visit these sites, and check whether they have a link for each entity in our database or not. If yes, I need to save their link to our database. The task description he wrote contained some strange wording that raised my suspicion. I learned that the companies in question not only did not give their consent to be queried, but also they already turned our approach down. I am within my probationary period, generally I liked the job. I had some interesting and completely OK tasks in the recent months only this last assignment seems to be fishy. I am not a lawyer. I work and live in a foreign country and I have limited knowledge of the language. It would be extremely hard for me to research whether it is legally OK, or not. We -as a company- have no legal department (As a matter of fact I never worked for any company that had one.). What I do have is a general bad feeling. I believe in business relationships based on **mutual consent** (and mutual benefit) and the lack thereof compromises my moral compass and grossly reduces my enthusiasm. 

The bottom line: I do not want to do anything that may later fall back on me. Nor do I want to act unethically. How can I handle this situation? 

Update:

> 
> So you're just scraping third-party sites? Is the scraped data just
>  used internally, or is it incorporated into one of your products? Is
>  the data private/behind a login screen?
> 
> 
> 

Yes, the scraped data will be incorporated into our product, and will be visible online. 

Is the data private/behind a login screen? I think available without logging in, but I am not sure.

Update: I just had a conversation with my boss, and I politely refused the task. We agreed that I leave the company.

Answer: 
**Have you asked your employer's legal department?** This sort of question is ***exactly*** why they are there; they can look at all the details and give you an expert opinion, and if the answer is "don't" they are in a position to argue this with your boss. 

We don't (and probsbly shouldn't) have all the details, can't give you legal advice, and have no sway with your boss.
I am not a lawyer, but I *believe* that scraping a website without permission will just get your company into legal trouble, and not you personally. But you should consult a lawyer to make sure.

But even when the risk is only for your company, it's a bad idea. Building a business based on scraping websites which don't want to be scraped is not going to work. They will take both legal and technical actions to prevent your company from doing this, so your service will break any day. When this is the main product of your company, then it will soon go bankrupt and be unable to pay your wage. So no matter if you get fired for not obeying or get sacked for obeying, you will need a new job soon.

If you are insistent on keeping your job, your only option is to convince your boss to look for a more viable business model.