Get a template
curl --request GET \
--url https://api.spidra.io/api/templates/{slug}import requests
url = "https://api.spidra.io/api/templates/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spidra.io/api/templates/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spidra.io/api/templates/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spidra.io/api/templates/{slug}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spidra.io/api/templates/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/templates/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"template": {
"slug": "google-maps-leads",
"version": 4,
"title": "Google Maps leads",
"summary": "Businesses with phone, website, rating and address for a search in one or more areas, plus emails and social links if you want them.",
"site": {
"key": "google-maps",
"name": "Google Maps",
"domain": "google.com"
},
"categories": [
"lead-generation"
],
"tool": "batch",
"featured": true,
"gallery": true,
"status": "active",
"fields": [
"Name",
"Category",
"Phone",
"Website",
"Emails",
"Instagram",
"Facebook",
"LinkedIn",
"Rating",
"Reviews",
"Address",
"Maps link"
],
"usesAi": false,
"description": "Type a kind of business and the areas you care about. You get every place Google Maps lists for each search, with phone, website, rating, address and a link, in one table. Places that show up in more than one area appear once. Turn on \"Find emails and social links\" to also check each place's website for emails, phone numbers and social profiles; the Emails, Instagram, Facebook and LinkedIn columns are added to the table when it is on.",
"limits": [
"Each page of a search has up to 20 places. Use more pages per area, or split a big city into neighbourhoods, to get more.",
"Popular times and price level need a signed-in visitor, so they are not included.",
"With \"Find emails and social links\" on, each website and its contact page are checked (up to 2 pages per site, 1 credit per page loaded, pages that fail are free), for up to 200 websites per run. Only details written on those pages are found."
],
"inputs": [
{
"key": "query",
"label": "Business type",
"type": "text",
"required": true,
"example": "dentist",
"placeholder": "dentist, coffee shop, plumber"
},
{
"key": "areas",
"label": "Areas",
"type": "list",
"required": true,
"example": [
"Lekki, Lagos",
"Ikeja, Lagos"
],
"maxItems": 25,
"help": "One per line. Each area is one search (1 credit)."
},
{
"key": "pages",
"label": "Pages per area",
"type": "number",
"default": 1,
"example": 1,
"min": 1,
"max": 5,
"help": "Each page adds up to 20 more places and costs 1 credit."
},
{
"key": "findContacts",
"label": "Find emails and social links",
"type": "boolean",
"default": false,
"help": "Also visits each place's website and its contact page for emails, phone numbers and Facebook, Instagram, LinkedIn, X, TikTok and YouTube links. 1 credit per page loaded (up to 2 per website); pages that fail are free."
},
{
"key": "language",
"label": "Language",
"type": "language",
"default": "en",
"advanced": true,
"help": "The language Google Maps writes place details in.",
"options": [
{
"value": "ab",
"label": "Abkhazian"
},
{
"value": "aa",
"label": "Afar"
},
{
"value": "af",
"label": "Afrikaans"
},
{
"value": "...",
"label": "..."
}
]
}
],
"columns": [
{
"key": "title",
"label": "Name"
},
{
"key": "category",
"label": "Category"
},
{
"key": "phone",
"label": "Phone"
},
{
"key": "website",
"label": "Website",
"format": "url"
},
{
"key": "emails",
"label": "Emails",
"format": "list",
"showIf": {
"input": "findContacts"
}
},
{
"key": "socials.instagram",
"label": "Instagram",
"format": "url",
"showIf": {
"input": "findContacts"
}
},
{
"key": "socials.facebook",
"label": "Facebook",
"format": "url",
"showIf": {
"input": "findContacts"
}
},
{
"key": "socials.linkedin",
"label": "LinkedIn",
"format": "url",
"showIf": {
"input": "findContacts"
}
},
{
"key": "rating",
"label": "Rating",
"format": "number"
},
{
"key": "reviewsCount",
"label": "Reviews",
"format": "number"
},
{
"key": "address",
"label": "Address"
},
{
"key": "googleMapsUrl",
"label": "Maps link",
"format": "url"
}
],
"hasRows": true,
"sample": [],
"variants": [],
"availability": null
}
}{
"status": "error",
"code": "TEMPLATE_NOT_FOUND",
"message": "There is no template called \"nope\". GET /api/templates lists them."
}Templates
Get a template
Returns everything you need to run a template: its inputs (the fields of its form), the columns its results table shows, its limits in plain words, and sample rows. No API key needed.
Send the inputs by key in inputs when you run the template. Inputs with a default can be left out. The dashboard’s API tab on a template’s page shows the exact request too.
GET
/
templates
/
{slug}
Get a template
curl --request GET \
--url https://api.spidra.io/api/templates/{slug}import requests
url = "https://api.spidra.io/api/templates/{slug}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spidra.io/api/templates/{slug}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spidra.io/api/templates/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.spidra.io/api/templates/{slug}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spidra.io/api/templates/{slug}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spidra.io/api/templates/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"template": {
"slug": "google-maps-leads",
"version": 4,
"title": "Google Maps leads",
"summary": "Businesses with phone, website, rating and address for a search in one or more areas, plus emails and social links if you want them.",
"site": {
"key": "google-maps",
"name": "Google Maps",
"domain": "google.com"
},
"categories": [
"lead-generation"
],
"tool": "batch",
"featured": true,
"gallery": true,
"status": "active",
"fields": [
"Name",
"Category",
"Phone",
"Website",
"Emails",
"Instagram",
"Facebook",
"LinkedIn",
"Rating",
"Reviews",
"Address",
"Maps link"
],
"usesAi": false,
"description": "Type a kind of business and the areas you care about. You get every place Google Maps lists for each search, with phone, website, rating, address and a link, in one table. Places that show up in more than one area appear once. Turn on \"Find emails and social links\" to also check each place's website for emails, phone numbers and social profiles; the Emails, Instagram, Facebook and LinkedIn columns are added to the table when it is on.",
"limits": [
"Each page of a search has up to 20 places. Use more pages per area, or split a big city into neighbourhoods, to get more.",
"Popular times and price level need a signed-in visitor, so they are not included.",
"With \"Find emails and social links\" on, each website and its contact page are checked (up to 2 pages per site, 1 credit per page loaded, pages that fail are free), for up to 200 websites per run. Only details written on those pages are found."
],
"inputs": [
{
"key": "query",
"label": "Business type",
"type": "text",
"required": true,
"example": "dentist",
"placeholder": "dentist, coffee shop, plumber"
},
{
"key": "areas",
"label": "Areas",
"type": "list",
"required": true,
"example": [
"Lekki, Lagos",
"Ikeja, Lagos"
],
"maxItems": 25,
"help": "One per line. Each area is one search (1 credit)."
},
{
"key": "pages",
"label": "Pages per area",
"type": "number",
"default": 1,
"example": 1,
"min": 1,
"max": 5,
"help": "Each page adds up to 20 more places and costs 1 credit."
},
{
"key": "findContacts",
"label": "Find emails and social links",
"type": "boolean",
"default": false,
"help": "Also visits each place's website and its contact page for emails, phone numbers and Facebook, Instagram, LinkedIn, X, TikTok and YouTube links. 1 credit per page loaded (up to 2 per website); pages that fail are free."
},
{
"key": "language",
"label": "Language",
"type": "language",
"default": "en",
"advanced": true,
"help": "The language Google Maps writes place details in.",
"options": [
{
"value": "ab",
"label": "Abkhazian"
},
{
"value": "aa",
"label": "Afar"
},
{
"value": "af",
"label": "Afrikaans"
},
{
"value": "...",
"label": "..."
}
]
}
],
"columns": [
{
"key": "title",
"label": "Name"
},
{
"key": "category",
"label": "Category"
},
{
"key": "phone",
"label": "Phone"
},
{
"key": "website",
"label": "Website",
"format": "url"
},
{
"key": "emails",
"label": "Emails",
"format": "list",
"showIf": {
"input": "findContacts"
}
},
{
"key": "socials.instagram",
"label": "Instagram",
"format": "url",
"showIf": {
"input": "findContacts"
}
},
{
"key": "socials.facebook",
"label": "Facebook",
"format": "url",
"showIf": {
"input": "findContacts"
}
},
{
"key": "socials.linkedin",
"label": "LinkedIn",
"format": "url",
"showIf": {
"input": "findContacts"
}
},
{
"key": "rating",
"label": "Rating",
"format": "number"
},
{
"key": "reviewsCount",
"label": "Reviews",
"format": "number"
},
{
"key": "address",
"label": "Address"
},
{
"key": "googleMapsUrl",
"label": "Maps link",
"format": "url"
}
],
"hasRows": true,
"sample": [],
"variants": [],
"availability": null
}
}{
"status": "error",
"code": "TEMPLATE_NOT_FOUND",
"message": "There is no template called \"nope\". GET /api/templates lists them."
}Was this page helpful?

