API Documentation

Introduction

ScrapeHammer extracts public social media data from Facebook, Instagram, TikTok and YouTube — posts, profiles, reels and engagement metrics, delivered as clean JSON. This documentation covers the REST API, which gives you a single, consistent interface for running scrapes from your own backend. Prefer a no-code workflow? The web console lets you start scrapes, watch results stream in live, and export data directly from your browser — no code required.

8+

Scrapers live

99.9%

Uptime target

0

Rate limits

Quickstart

Create an account, copy your API key from the Profile page and fire your first run against https://api.scrapehammer.com. Every new account starts with free credits.

curl -X POST https://api.scrapehammer.com/facebook-posts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "urls": ["https://facebook.com/some-page"], "days": 30 }'
A successful request returns a job_id. Poll the job or subscribe to the stream to receive rows as they are scraped.

Authentication

There is no separate API login. Every request is authenticated with your personal API token, sent in the X-API-Key header. You can view and copy your token on the Profile page.

auth.sh
curl https://api.scrapehammer.com/credits \
  -H "X-API-Key: YOUR_API_KEY"

No account yet? Create one — the free plan includes enough credits to test every scraper. Keep your token secret: it is the only credential the API needs.

Credits & limits

ScrapeHammer does not enforce artificial per-second rate limits. You pay only for what you scrape through the credit system. Check your balance any time with GET /credits.

credits.sh
curl https://api.scrapehammer.com/credits \
  -H "X-API-Key: YOUR_API_KEY"
credits.json
{
  "credits": 8820,
  "valid_until": "2026-08-13T00:00:00Z",
  "expired": false,
  "pricing": {
    "credits_per_post": 1,
    "min_per_job": 10,
    "grace": 20
  }
}

Pay per row

credits_per_post is deducted per successfully returned item — failed rows are never billed.

Job minimum & grace

Every job reserves at least min_per_job credits, and grace lets a running job slightly overshoot your balance.

Response codes

The API uses conventional HTTP status codes to signal success or failure.

CodeStatusMeaning
200OKThe request was processed and data was returned.
400Bad RequestInvalid parameters or a missing required field.
401UnauthorizedMissing or invalid X-API-Key header.
402Payment RequiredYour credit balance is empty — top up to continue.
403ForbiddenThe public source blocks this resource (e.g. age-restricted content).
404Not FoundThe requested job or resource could not be located.
500Server ErrorTemporary issue on our side — retry after a short delay.

Support & feedback

Missing an endpoint, hit an edge case or need a custom scraper? Reach out on the Contact page — we usually reply within one business day.