GET Get Map Result
Poll for map job status and retrieve discovered URLs
GET
https://api.anakin.io/v1/map/{id}Retrieve the status and results of a map job. Use this to poll for completion after submitting a map request.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id required | string | The job ID returned from the submit endpoint |
Response
200 OK{
"id": "job_abc123xyz",
"status": "completed",
"url": "https://example.com",
"links": [
"https://example.com/about",
"https://example.com/blog",
"https://example.com/blog/post-1",
"https://example.com/contact",
"https://example.com/pricing"
],
"totalLinks": 5,
"createdAt": "2024-01-01T12:00:00Z",
"completedAt": "2024-01-01T12:00:03Z",
"durationMs": 3000
}Response Fields
| Field | Type | Description |
|---|---|---|
status | string | pending, processing, completed, or failed |
url | string | The original URL submitted for discovery |
links | string[] | Array of discovered URLs. Only present when completed. |
totalLinks | number | Total count of discovered URLs. |
error | string | Error message. Only present when failed. |
durationMs | number | Processing time in milliseconds. |
Code Examples
curl -X GET https://api.anakin.io/v1/map/job_abc123xyz \
-H "X-API-Key: your_api_key"import requests
import time
job_id = "job_abc123xyz"
while True:
result = requests.get(
f'https://api.anakin.io/v1/map/{job_id}',
headers={'X-API-Key': 'your_api_key'}
)
data = result.json()
if data['status'] == 'completed':
print(f"Found {data['totalLinks']} URLs:")
for link in data['links']:
print(f" {link}")
break
elif data['status'] == 'failed':
print(f"Error: {data['error']}")
break
time.sleep(1)const jobId = 'job_abc123xyz';
const poll = async () => {
const res = await fetch(`https://api.anakin.io/v1/map/${jobId}`, {
headers: { 'X-API-Key': 'your_api_key' }
});
const data = await res.json();
if (data.status === 'completed') {
console.log(`Found ${data.totalLinks} URLs:`);
data.links.forEach(link => console.log(` ${link}`));
} else if (data.status === 'failed') {
console.error(data.error);
} else {
setTimeout(poll, 1000);
}
};
poll();For polling patterns, see the Polling Jobs reference.