# Add Referer

Source: https://docs.scrappey.com/docs/add-referer

> Simulate natural browser navigation by visiting a page first or injecting a static Referer header before making a POST request.

## Command

`"request.post"` — use `getUrl` or `customHeaders` to supply the referer.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `cmd` | string | Yes | Should be `"request.post"` |
| `url` | string | Yes | Target POST endpoint |
| `postData` | string | Yes | Data to send in the POST body (URL-encoded or JSON as required) |
| `getUrl` | string | No | Visit this URL first; it becomes the referer (most natural approach) |
| `customHeaders` | object | No | Add `"Referer"` directly via headers (when no anti-bot checks are involved) |

## Example

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.post",
    "url": "https://lift-api.vfsglobal.com/user/login",
    "getUrl": "https://vfsglobal.com",
    "postData": "a=b&b=c"
  }'
```

## Notes

- `getUrl` is preferred when facing anti-bot protection, as it simulates a real navigation path.
- `customHeaders` is simpler and faster if no referer validation is enforced.
- This approach increases request authenticity and helps avoid blocks from systems that expect a valid navigation path before a POST operation.
