Introduction
Scrapii is a secure PII redaction and tokenization API built for privacy-first AI workflows. It detects and replaces sensitive data with non-sensitive tokens, allowing documents to be safely processed by public AI services and frontier LLMs without exposing regulated or personal information.
Scrapii supports authorized detokenization, enabling clients to securely restore original values when required for downstream workflows, audits, or human review. For maximum trust and data sovereignty, Scrapii also supports client-controlled token encryption, ensuring sensitive values can only be decrypted by the clientβnever the platform.
Designed for developers, Scrapii integrates seamlessly into automated pipelines via REST APIs, n8n workflows, or any existing processing pipeline, enabling low-friction redaction and de-identification across text, PDFs, and images. Deterministic token mapping preserves referential integrity while maintaining strict data boundaries.
Scrapii is ideal for compliance-driven industries such as healthcare, legal, and finance, helping teams meet GDPR, HIPAA, SOC 2, and PIPEDA requirements while still leveraging modern AI, document processing, and automation tools.
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can create API keys by visiting your dashboard and clicking Generate API Key. Include the API key in the Authorization header as: Bearer {apikey}
Endpoints
GET api/v1/test
requires authentication
Example request:
curl --request GET \
--get "https://scrapii.net/api/v1/test" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://scrapii.net/api/v1/test"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/test';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/test'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload and tokenize a document.
requires authentication
Upload a document for PII detection and tokenization.
Example request:
curl --request POST \
"https://scrapii.net/api/v1/document" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "confidence_threshold=0.85"\
--form "entity_types[]=EMAIL_ADDRESS"\
--form "file=@/tmp/php6jlkadupsphhfXMFu2P" const url = new URL(
"https://scrapii.net/api/v1/document"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('confidence_threshold', '0.85');
body.append('entity_types[]', 'EMAIL_ADDRESS');
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/document';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'confidence_threshold',
'contents' => '0.85'
],
[
'name' => 'entity_types[]',
'contents' => 'EMAIL_ADDRESS'
],
[
'name' => 'file',
'contents' => fopen('/tmp/php6jlkadupsphhfXMFu2P', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/document'
files = {
'confidence_threshold': (None, '0.85'),
'entity_types[]': (None, 'EMAIL_ADDRESS'),
'file': open('/tmp/php6jlkadupsphhfXMFu2P', 'rb')}
payload = {
"confidence_threshold": 0.85,
"entity_types": [
"EMAIL_ADDRESS",
"PHONE_NUMBER"
]
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, files=files)
response.json()Example response (201):
{
"message": "Document uploaded successfully.",
"data": {
"id": "9d3a5c8e-4b2f-4a1e-8c3d-5e6f7a8b9c0d",
"user_id": 1,
"mode": "token",
"status": "queued",
"original_filename": "example.pdf",
"confidence_threshold": 0.85,
"entity_types": [
"EMAIL_ADDRESS",
"PHONE_NUMBER"
],
"progress_percentage": 0,
"current_step": "Queued for processing",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:00.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get the tokenized document content.
requires authentication
Example request:
curl --request GET \
--get "https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"message": "Document content retrieved successfully.",
"data": {
"content": "Contact [TOKEN:EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e] for more information.",
"document_id": "9d3a5c8e-4b2f-4a1e-8c3d-5e6f7a8b9c0d",
"original_filename": "example.pdf"
}
}
Example response (403):
{
"message": "You do not have permission to access this document."
}
Example response (404):
{
"message": "Processed document file not found."
}
Example response (409, Not Ready):
{
"message": "Document is not ready for download."
}
Example response (409, Failed):
{
"message": "Document processing failed and cannot be downloaded."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get document status and details.
requires authentication
Example request:
curl --request GET \
--get "https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/status" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/status"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/status';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/status'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"data": {
"id": "9d3a5c8e-4b2f-4a1e-8c3d-5e6f7a8b9c0d",
"user_id": 1,
"mode": "token",
"status": "completed",
"original_filename": "example.pdf",
"confidence_threshold": 0.85,
"entity_types": [
"EMAIL_ADDRESS",
"PHONE_NUMBER"
],
"progress_percentage": 100,
"current_step": "Processing complete",
"created_at": "2024-01-01T00:00:00.000000Z",
"updated_at": "2024-01-01T00:00:01.000000Z"
}
}
Example response (403):
{
"message": "You do not have permission to access this document."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detokenize a processed document and return the original content.
requires authentication
Example request:
curl --request GET \
--get "https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/detokenize" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/detokenize"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/detokenize';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/document/019c4ece-4c65-70c9-9b0b-09c861785a85/detokenize'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"message": "Document detokenized successfully.",
"data": {
"content": "Contact john.doe@example.com for more information.",
"document_id": "9d3a5c8e-4b2f-4a1e-8c3d-5e6f7a8b9c0d",
"original_filename": "example.pdf",
"tokens_found": [
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e"
],
"tokens_replaced": [
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e"
],
"tokens_failed": [],
"total_detokenizations": 1
}
}
Example response (400):
{
"message": "Document is not tokenized"
}
Example response (403):
{
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download multiple tokenized documents as a single combined file.
requires authentication
Example request:
curl --request POST \
"https://scrapii.net/api/v1/documents" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"document_ids\": [
\"6ff8f7f6-1eb3-3525-be4a-3932c805afed\"
],
\"separator\": \"g\"
}"
const url = new URL(
"https://scrapii.net/api/v1/documents"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"document_ids": [
"6ff8f7f6-1eb3-3525-be4a-3932c805afed"
],
"separator": "g"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/documents';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'document_ids' => [
'6ff8f7f6-1eb3-3525-be4a-3932c805afed',
],
'separator' => 'g',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/documents'
payload = {
"document_ids": [
"6ff8f7f6-1eb3-3525-be4a-3932c805afed"
],
"separator": "g"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200, Success):
Returns a combined text file containing all requested tokenized documents.
Example response (404):
{
"message": "Some documents were not found or do not belong to you.",
"missing_document_ids": [
"9d3a5c8e-4b2f-4a1e-8c3d-5e6f7a8b9c0d"
]
}
Example response (422):
{
"message": "Some documents are not ready for download.",
"not_ready_documents": [
{
"id": "9d3a5c8e-4b2f-4a1e-8c3d-5e6f7a8b9c0d",
"status": "processing",
"error_message": null
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get a single token's original PII value.
requires authentication
Example request:
curl --request GET \
--get "https://scrapii.net/api/v1/detokenize/architecto" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://scrapii.net/api/v1/detokenize/architecto"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/detokenize/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/detokenize/architecto'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"message": "Token retrieved successfully.",
"data": {
"token_id": "EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e",
"pii_value": "john.doe@example.com"
}
}
Example response (404):
{
"message": "Token not found or access denied."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detokenize text content by replacing tokens with original PII values.
requires authentication
Example request:
curl --request POST \
"https://scrapii.net/api/v1/detokenize" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"content\": \"b\"
}"
const url = new URL(
"https://scrapii.net/api/v1/detokenize"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"content": "b"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/detokenize';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'content' => 'b',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/detokenize'
payload = {
"content": "b"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"message": "Content detokenized successfully.",
"data": {
"detokenized_content": "Contact John Doe at john.doe@example.com or (555) 123-4567.",
"tokens_found": [
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e",
"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4"
],
"tokens_replaced": [
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e",
"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4"
],
"tokens_failed": [],
"total_detokenizations": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detokenize uploaded text/csv files by replacing tokens with original PII values.
requires authentication
Example request:
curl --request POST \
"https://scrapii.net/api/v1/detokenize/file" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "file=@/tmp/phpa9r8nnmlj68lbAuqzIm" const url = new URL(
"https://scrapii.net/api/v1/detokenize/file"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/detokenize/file';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'multipart' => [
[
'name' => 'file',
'contents' => fopen('/tmp/phpa9r8nnmlj68lbAuqzIm', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/detokenize/file'
files = {
'file': open('/tmp/phpa9r8nnmlj68lbAuqzIm', 'rb')}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'multipart/form-data',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, files=files)
response.json()Example response (200):
{
"message": "File detokenized successfully.",
"data": {
"detokenized_content": "Contact John Doe at john.doe@example.com or (555) 123-4567.",
"tokens_found": [
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e",
"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4"
],
"tokens_replaced": [
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e",
"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4"
],
"tokens_failed": [],
"total_detokenizations": 2
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Detokenize tokens.
requires authentication
Supply an array of token IDs to retrieve their original PII values.
Token IDs follow the format: TYPE:hash (e.g., PHONE_NUMBER:abc123...).
To extract token IDs from tokenized content, use this regex pattern:
/\[TOKEN:([A-Z_]+:[a-f0-9]+)\]/g
This will match tokens like:
[TOKEN:US_SSN:1d593fdba2209408e11e0384a9a257d2e058d1532ade7ac8c47e0f447b1edaaa]
And capture the token ID:
US_SSN:1d593fdba2209408e11e0384a9a257d2e058d1532ade7ac8c47e0f447b1edaaa
Example request:
curl --request POST \
"https://scrapii.net/api/v1/detokenize/tokens" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"tokens\": [
\"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4\",
\"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e\"
]
}"
const url = new URL(
"https://scrapii.net/api/v1/detokenize/tokens"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"tokens": [
"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4",
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/v1/detokenize/tokens';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'tokens' => [
'PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4',
'EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/v1/detokenize/tokens'
payload = {
"tokens": [
"PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4",
"EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e"
]
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
"message": "Token retrieval completed.",
"data": {
"tokens": [
{
"token": "PHONE_NUMBER:07bf49bd8a8796e3e120e873e51da7156904ffdf6049c74c37da599609a7caf4",
"value": "(555) 123-4567",
"found": true
},
{
"token": "EMAIL_ADDRESS:f26ab8cf5a26d76fd04f4f7a740b0c0e596975c528cb0028a365898fae44915e",
"value": "john.doe@example.com",
"found": true
}
],
"total_requested": 2,
"total_found": 2,
"total_not_found": 0
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/openapi.json
requires authentication
Example request:
curl --request GET \
--get "https://scrapii.net/api/openapi.json" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://scrapii.net/api/openapi.json"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://scrapii.net/api/openapi.json';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://scrapii.net/api/openapi.json'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (302):
Show headers
cache-control: no-cache, private
location: https://scrapii.net/docs/openapi.json
content-type: text/html; charset=utf-8
vary: X-Inertia, Origin
set-cookie: XSRF-TOKEN=eyJpdiI6IkJPREIvY2IycWFYUEFodTI2eFNzRXc9PSIsInZhbHVlIjoiVGdrNGZ3RzVQdXV2VWh6clQ3NGYyaDhiaTZETktpOE1wU1VoeHFPM08vZkw0SUJSMm8yakhVTkE3UDZSN3VVWTU5WjFTbXVFaisyMmF5dU1DU1lCSjMxT0ZTaDZObVFvUFlDZGsyZjY2OWgzVTVmaFJVRHZDcU5QNW9xNEdXUGIiLCJtYWMiOiJkYjZlZjI4OGVlYWM1ZmU5OWEwMTIzMjQ4YzZkMjgwMjM0MDZlNTNjZmEwZjU2ZDJlMTlhMDU4MTJmZTUyYzc3IiwidGFnIjoiIn0%3D; expires=Thu, 26 Feb 2026 21:58:28 GMT; Max-Age=7200; path=/; secure; samesite=lax; scrapii-session=eyJpdiI6ImZCdmJDSGpBUXNaWUVJYkw0ei9YVUE9PSIsInZhbHVlIjoiUE12dE9DdzNFU2cvQlIrVWI4ckZ0VGVhdUNsVGhWRjhTSXFQTXp1bldoS0hiemtGSHcvd3QwWnBSUXpZMW9XbEdZZjhmcGJ2TFV4NVFhRGs2bkNFUU1DdmxFeUowcURwU2hDYlZGOWl3S1BCTUo1S2poQmU4SkgxdnZFYmR3aGciLCJtYWMiOiI2MTc0MjNmZTdjNWVmNzhkMTQ2ZjBiZTUxYWUyODY3MWU1NzBiNTViZmJjNTZmZDUyZjdmYjM2NmY5Mzc2ZDk5IiwidGFnIjoiIn0%3D; expires=Thu, 26 Feb 2026 21:58:28 GMT; Max-Age=7200; path=/; secure; httponly; samesite=lax
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url='https://scrapii.net/docs/openapi.json'" />
<title>Redirecting to https://scrapii.net/docs/openapi.json</title>
</head>
<body>
Redirecting to <a href="https://scrapii.net/docs/openapi.json">https://scrapii.net/docs/openapi.json</a>.
</body>
</html>
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.