Hacker News new | ask | show | jobs
by ganessh 3210 days ago
If I have to know the elements' selectors, why should I prefer this service over using a HTML parser?
2 comments

It depends on the use case. Say you want to get all images on a page you'd just use `img`. If you are going to find JSON-LD blocks defined in a set of pages, you can use - `script[type='application/ld+json']`.

For MVP, I wanted to give the option of free-form selectors and then offer more targeted queries based on what people use.

Consider offering responses other formats, possibly protobuf. Then you can sell it as a solution for limited IoT devices where a full HTML parser is too much. If your service avoids having to host a custom server, it could be very useful.
Yeah, It kind of defeats the point/value prop of an API.