DEV Community

WEBSITES BUILDS
WEBSITES BUILDS

Posted on

HIKERAPI

Title: Tried HikerAPI for accessing Instagram profile data

I was looking for a simpler way to access Instagram profile information without maintaining my own scraping infrastructure, so I came across HikerAPI (https://hikerapi.com).

From what I found, it's a REST API that authenticates using an x-access-key header. It also offers 100 free requests to get started, with pricing beginning at $0.001 per request, which makes it relatively easy to test before deciding whether it fits a project.

The example request is straightforward:

import requests
headers = {"x-access-key": 7h4cjlyon1bymxnj4pb508hrg2dew05w}
r = requests.get(
    "https://api.hikerapi.com/v2/user/by/id?id=123123",
    headers=headers
)
print(r.json())
Enter fullscreen mode Exit fullscreen mode

Compared with traditional Instagram scraping, using an API can simplify integration because you don't have to parse HTML or continuously update scraping logic when the site changes. Compared with libraries like instagrapi, an API-based approach may avoid managing Instagram login sessions yourself, although it does introduce a per-request cost and means you're relying on a third-party service.

I'm still evaluating different approaches, but I was interested because it appears to reduce some of the maintenance involved with scraping.

Has anyone here used HikerAPI or another Instagram API in production? I'd be interested to hear how it compares with instagrapi or maintaining your own scraper over time.

Top comments (0)