Certainly it can be done. Note the REST API is preferred, but the SOAP API is still supported.
Either way you want the method `Get Lead Activity` filtered by what you consider web-related activity types (mainly Visit Web Page and Clicked Link, but possibly also Filled Out Form).
You'll be getting XML or JSON results to parse and return into the database, and you need to keep track of checkpoints (timestamps) to not duplicate records.
If you're a developer already building this kind of middleware will be doable (you can do it in PHP, Node, Java, .NET, whatever).