SPHYNX
esc
  • Loading
Open console

SphynxDocumentation

Sphynx browser fights blocks so you don't have to. Create a session with one request, then drive it from your code or hand it to an agent. Surfing the internet shouldn't be difficult.

Three ways to use a session

A session is one running browser with its own fingerprint and, if you ask for one, its own proxy. Use it in any of three ways.

A first request

Create a session, read a page as Markdown, close the session. The snippets assume two environment variables: SPHYNX_URL is the base URL of your deployment and SPHYNX_API_KEY is your key.

curl
SESSION=$(curl -s -X POST "$SPHYNX_URL/v1/sessions" \
  -H "Authorization: Bearer $SPHYNX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"os": "mac", "proxy": {"type": "residential", "country": "us"}}' | jq -r .id)

curl -s -X POST "$SPHYNX_URL/v1/sessions/$SESSION/extract" \
  -H "Authorization: Bearer $SPHYNX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "formats": ["markdown"]}' | jq -r .markdown

curl -s -X DELETE "$SPHYNX_URL/v1/sessions/$SESSION" \
  -H "Authorization: Bearer $SPHYNX_API_KEY"

Where to go next