CAPTCHA verification
Creates a new captcha session
POST /api/security/captcha/create
https://api.cookie-api.com/api/security/captcha/create
Authentication Learn how to get your API Key and use it in your requests!
URL Parameters | |
---|---|
color optional | Accent color of the verification page in HEX format (Default: #4EAF54) |
font optional | Font to be used. All available fonts are here: https://fonts.google.com . (Default font: Poppins) |
captcha_provider | CAPTCHA Provider to be used. Use either Cloudflare or Google |
expires optional | UNIX Timestamp in the future to set the expiration (Default: 1 hour, Max: 2 days) |
Wondering what captcha provider is the best for you? Check out our comparison pages:
curl --location --request POST 'http://api.cookie-api.com/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF' \--header 'Authorization: API_Key'
import requests
url = 'http://api.cookie-api.com/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF'headers = {'Authorization': 'API_Key'}
response = requests.post(url, headers=headers)print(response.json())
const fetch = require('node-fetch');
const url = 'http://api.cookie-api.com/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF';
fetch(url, { method: 'POST', headers: { 'Authorization': 'API_Key' }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));
package main
import ( "bytes" "fmt" "log" "net/http" "io/ioutil")
func main() { url := "http://api.cookie-api.com/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF" req, err := http.NewRequest("POST", url, nil) if err != nil { log.Fatal(err) } req.Header.Add("Authorization", "API_Key")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }
fmt.Println(string(body))}
const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF', method: 'POST', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, (res) => { let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', (e) => { console.error(e);});
req.end();
require 'net/http'require 'json'require 'uri'
uri = URI.parse("http://api.cookie-api.com/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF")request = Net::HTTP::Post.new(uri)request["Authorization"] = "API_Key"
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request)}
puts JSON.parse(response.body)
use reqwest::header::HeaderMap;use reqwest::blocking::Client;use reqwest::blocking::Response;
fn main() { let url = "http://api.cookie-api.com/api/security/captcha/create?captcha_provider=cloudflare&font=balls&color=%23FFFFFF"; let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let client = Client::new(); let res: Response = client.post(url).headers(headers).send().unwrap();
println!("{}", res.text().unwrap());}
Responses
{ "captcha_id": "2725738690", "success": true, "url": "https://api.cookie-api.com/public/captcha?code=JPe-hyVw2m6l_a-W7jqfSWwtdp-jYpOADPKMBwac1-qEAYKQ-NjFcRf0oE24TjfHn0873As1n9Kr5KGcVBoy-v2ccUm_KcFam4UM7AbaiykAV-vpVScVx4Mpt06ScELSbpt-tKJRT3J-mDK4bUWHVYxTvgXunJHhkCDRb03SnrTqRO0SJnCPM9bgPfL9KqHZ3DVWmLnhpPxGrXRxB4HZ", "url_code": "JPe-hyVw2m6l_a-W7jqfSWwtdp-jYpOADPKMBwac1-qEAYKQ-NjFcRf0oE24TjfHn0873As1n9Kr5KGcVBoy-v2ccUm_KcFam4UM7AbaiykAV-vpVScVx4Mpt06ScELSbpt-tKJRT3J-mDK4bUWHVYxTvgXunJHhkCDRb03SnrTqRO0SJnCPM9bgPfL9KqHZ3DVWmLnhpPxGrXRxB4HZ"}
Get a CAPTCHA session
Returns a the result/status of a CAPTCHA session
GET /api/security/captcha/get-captcha
https://api.cookie-api.com/api/security/captcha/get-captcha
Authentication Learn how to get your API Key and use it in your requests!
URL Parameters | |
---|---|
captcha_id | CAPTCHA ID of the CAPTCHA chellange |
curl --location 'http://api.cookie-api.com/api/security/captcha/get-captcha?captcha_id=2725738690' \--header 'Authorization: API_Key'
import requests
url = 'http://api.cookie-api.com/api/security/captcha/get-captcha?captcha_id=2725738690'headers = {'Authorization': 'API_Key'}
response = requests.get(url, headers=headers)print(response.json())
const fetch = require('node-fetch');
const url = 'http://api.cookie-api.com/api/security/captcha/get-captcha?captcha_id=2725738690';
fetch(url, { method: 'GET', headers: { 'Authorization': 'API_Key' }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));
package main
import ( "fmt" "io/ioutil" "log" "net/http")
func main() { url := "http://api.cookie-api.com/api/security/captcha/get-captcha?captcha_id=2725738690" req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatal(err) } req.Header.Add("Authorization", "API_Key")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }
fmt.Println(string(body))}
const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/security/captcha/get-captcha?captcha_id=2725738690', method: 'GET', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, (res) => { let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', (e) => { console.error(e);});
req.end();
require 'net/http'require 'json'require 'uri'
uri = URI.parse("http://api.cookie-api.com/api/security/captcha/get-captcha?captcha_id=2725738690")request = Net::HTTP::Get.new(uri)request["Authorization"] = "API_Key"
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request)}
puts JSON.parse(response.body)
use reqwest::header::HeaderMap;use reqwest::blocking::Client;use reqwest::blocking::Response;
fn main() { let url = "http://api.cookie-api.com/api/security/captcha/get-captcha?captcha_id=2725738690"; let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let client = Client::new(); let res: Response = client.get(url).headers(headers).send().unwrap();
println!("{}", res.text().unwrap());}
Responses
{ "captcha_id": "2725738690", "created_at": "1739110385", "solved": "YES", "solved_at": "1739110529", "success": true}
Delete a CAPTCHA session
Deletes a CAPTCHA session
DELETE /api/security/captcha/get-captcha
https://api.cookie-api.com/api/security/captcha/get-captcha
Authentication Learn how to get your API Key and use it in your requests!
URL Parameters | |
---|---|
captcha_id | CAPTCHA ID of the CAPTCHA challenge |
curl --location --request DELETE 'http://api.cookie-api.com/api/security/captcha/delete?captcha_id=2725738690' \--header 'Authorization: API_Key'
import requests
url = 'http://api.cookie-api.com/api/security/captcha/delete?captcha_id=2725738690'headers = {'Authorization': 'API_Key'}
response = requests.delete(url, headers=headers)print(response.json())
const fetch = require('node-fetch');
const url = 'http://api.cookie-api.com/api/security/captcha/delete?captcha_id=2725738690';
fetch(url, { method: 'DELETE', headers: { 'Authorization': 'API_Key' }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));
package main
import ( "fmt" "io/ioutil" "log" "net/http")
func main() { url := "http://api.cookie-api.com/api/security/captcha/delete?captcha_id=2725738690" req, err := http.NewRequest("DELETE", url, nil) if err != nil { log.Fatal(err) } req.Header.Add("Authorization", "API_Key")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }
fmt.Println(string(body))}
const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/security/captcha/delete?captcha_id=2725738690', method: 'DELETE', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, (res) => { let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', (e) => { console.error(e);});
req.end();
require 'net/http'require 'json'require 'uri'
uri = URI.parse("http://api.cookie-api.com/api/security/captcha/delete?captcha_id=2725738690")request = Net::HTTP::Delete.new(uri)request["Authorization"] = "API_Key"
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request)}
puts JSON.parse(response.body)
use reqwest::header::HeaderMap;use reqwest::blocking::Client;use reqwest::blocking::Response;
fn main() { let url = "http://api.cookie-api.com/api/security/captcha/delete?captcha_id=2725738690"; let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let client = Client::new(); let res: Response = client.delete(url).headers(headers).send().unwrap();
println!("{}", res.text().unwrap());}
Responses
{ "success": true}
List all CAPTCHA sessions
Lists all your CAPTCHA sessions
GET /api/security/captcha/list
https://api.cookie-api.com/api/security/captcha/list
Authentication Learn how to get your API Key and use it in your requests!
curl --location 'http://api.cookie-api.com/api/security/captcha/list' \--header 'Authorization: API_Key'
import requests
url = 'http://api.cookie-api.com/api/security/captcha/list'headers = {'Authorization': 'API_Key'}
response = requests.get(url, headers=headers)print(response.json())
const fetch = require('node-fetch');
const url = 'http://api.cookie-api.com/api/security/captcha/list';
fetch(url, { method: 'GET', headers: { 'Authorization': 'API_Key' }}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));
package main
import ( "fmt" "io/ioutil" "log" "net/http")
func main() { url := "http://api.cookie-api.com/api/security/captcha/list" req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatal(err) } req.Header.Add("Authorization", "API_Key")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }
fmt.Println(string(body))}
const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/security/captcha/list', method: 'GET', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, (res) => { let data = '';
res.on('data', (chunk) => { data += chunk; });
res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', (e) => { console.error(e);});
req.end();
require 'net/http'require 'json'require 'uri'
uri = URI.parse("http://api.cookie-api.com/api/security/captcha/list")request = Net::HTTP::Get.new(uri)request["Authorization"] = "API_Key"
response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(request)}
puts JSON.parse(response.body)
use reqwest::header::HeaderMap;use reqwest::blocking::get;use std::collections::HashMap;
fn main() { let url = "http://api.cookie-api.com/api/security/captcha/list"; let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let client = reqwest::blocking::Client::new(); let res = client.get(url).headers(headers).send().unwrap();
println!("{}", res.text().unwrap());}
Responses
{ "count": 3, "sessions": [ { "captcha_id": "3625236803", "created_at": "1739066578", "solved": "YES", "solved_at": "1739102437" }, { "captcha_id": "7395811932", "created_at": "1739067793", "solved": "YES", "solved_at": "1739101442" }, { "captcha_id": "6322587024", "created_at": "1739110162", "solved": "NO", "solved_at": "0" } ], "success": true}
Cloudflare Turnstile
Pros:
- Minimal interaction: Most users won’t even notice they’re going through a CAPTCHA challenge, providing a seamless experience.
- Privacy-focused: Doesn’t track users with cookies or collect personal data, offering better privacy.
- Faster and smoother: Since it’s mostly behind-the-scenes, users rarely experience interruptions or delays.
- No annoying challenges: For most users, there are no checkboxes or image puzzles to solve, making it less frustrating.
Cons:
- Newer system: As a newer solution, it might not be as widely recognized, so some users may not be familiar with it.
Google reCAPTCHA V2
Pros:
- Widely recognized: Users are very familiar with the “I’m not a robot” checkbox, so they know what to expect.
- Reliable: Google’s system is well-established and trusted by many websites, ensuring high accuracy in detecting bots.
Cons:
- Interruptions: Users often need to interact with the CAPTCHA by clicking the checkbox or solving image puzzles, which can be annoying or time-consuming.
- Privacy concerns: Google collects user data (e.g., IP address, cookies) to analyze behavior, which could raise privacy concerns for users who are more privacy-conscious.
- False positives: Sometimes, legitimate users are flagged as suspicious and forced to complete additional challenges, which can be frustrating.