/craigslist/postings/search
curl --request POST \
--url https://api.anysite.io/api/craigslist/postings/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"area": "<string>",
"count": 5000,
"timeout": 300,
"category": "sss",
"keyword": "<string>",
"subarea": "<string>",
"sort": "newest",
"postal": "<string>",
"lat": 0,
"lon": 0,
"radius": 1,
"min_price": 1,
"max_price": 1,
"free": false,
"titles_only": false,
"has_image": false,
"posted_today": false,
"hide_duplicates": false,
"crypto_ok": false,
"delivery_available": false,
"language": [],
"condition": [],
"make_model": "<string>",
"min_auto_year": 1,
"max_auto_year": 1,
"min_auto_miles": 1,
"max_auto_miles": 1,
"min_monthly_payment": 1,
"max_monthly_payment": 1,
"transmission": [],
"drivetrain": [],
"fuel_type": [],
"title_status": [],
"body_type": [],
"paint": [],
"cylinders": [],
"min_engine_displacement_cc": 1,
"max_engine_displacement_cc": 1,
"street_legal": false,
"motorcycle_motor": [],
"motorcycle_type": [],
"min_boat_length": 1,
"max_boat_length": 1,
"min_year_manufactured": 1,
"max_year_manufactured": 1,
"boat_propulsion": [],
"boat_type": [],
"min_bedrooms": 1,
"max_bedrooms": 1,
"min_bathrooms": 1,
"max_bathrooms": 1,
"min_sqft": 1,
"max_sqft": 1,
"housing_features": [],
"rent_period": [],
"housing_type": [],
"laundry": [],
"parking": [],
"employment_type": [],
"is_internship": false,
"is_nonprofit": false,
"is_telecommuting": false,
"lost_or_found": [],
"event_types": []
}
'import requests
url = "https://api.anysite.io/api/craigslist/postings/search"
payload = {
"area": "<string>",
"count": 5000,
"timeout": 300,
"category": "sss",
"keyword": "<string>",
"subarea": "<string>",
"sort": "newest",
"postal": "<string>",
"lat": 0,
"lon": 0,
"radius": 1,
"min_price": 1,
"max_price": 1,
"free": False,
"titles_only": False,
"has_image": False,
"posted_today": False,
"hide_duplicates": False,
"crypto_ok": False,
"delivery_available": False,
"language": [],
"condition": [],
"make_model": "<string>",
"min_auto_year": 1,
"max_auto_year": 1,
"min_auto_miles": 1,
"max_auto_miles": 1,
"min_monthly_payment": 1,
"max_monthly_payment": 1,
"transmission": [],
"drivetrain": [],
"fuel_type": [],
"title_status": [],
"body_type": [],
"paint": [],
"cylinders": [],
"min_engine_displacement_cc": 1,
"max_engine_displacement_cc": 1,
"street_legal": False,
"motorcycle_motor": [],
"motorcycle_type": [],
"min_boat_length": 1,
"max_boat_length": 1,
"min_year_manufactured": 1,
"max_year_manufactured": 1,
"boat_propulsion": [],
"boat_type": [],
"min_bedrooms": 1,
"max_bedrooms": 1,
"min_bathrooms": 1,
"max_bathrooms": 1,
"min_sqft": 1,
"max_sqft": 1,
"housing_features": [],
"rent_period": [],
"housing_type": [],
"laundry": [],
"parking": [],
"employment_type": [],
"is_internship": False,
"is_nonprofit": False,
"is_telecommuting": False,
"lost_or_found": [],
"event_types": []
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
area: '<string>',
count: 5000,
timeout: 300,
category: 'sss',
keyword: '<string>',
subarea: '<string>',
sort: 'newest',
postal: '<string>',
lat: 0,
lon: 0,
radius: 1,
min_price: 1,
max_price: 1,
free: false,
titles_only: false,
has_image: false,
posted_today: false,
hide_duplicates: false,
crypto_ok: false,
delivery_available: false,
language: [],
condition: [],
make_model: '<string>',
min_auto_year: 1,
max_auto_year: 1,
min_auto_miles: 1,
max_auto_miles: 1,
min_monthly_payment: 1,
max_monthly_payment: 1,
transmission: [],
drivetrain: [],
fuel_type: [],
title_status: [],
body_type: [],
paint: [],
cylinders: [],
min_engine_displacement_cc: 1,
max_engine_displacement_cc: 1,
street_legal: false,
motorcycle_motor: [],
motorcycle_type: [],
min_boat_length: 1,
max_boat_length: 1,
min_year_manufactured: 1,
max_year_manufactured: 1,
boat_propulsion: [],
boat_type: [],
min_bedrooms: 1,
max_bedrooms: 1,
min_bathrooms: 1,
max_bathrooms: 1,
min_sqft: 1,
max_sqft: 1,
housing_features: [],
rent_period: [],
housing_type: [],
laundry: [],
parking: [],
employment_type: [],
is_internship: false,
is_nonprofit: false,
is_telecommuting: false,
lost_or_found: [],
event_types: []
})
};
fetch('https://api.anysite.io/api/craigslist/postings/search', 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.anysite.io/api/craigslist/postings/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'area' => '<string>',
'count' => 5000,
'timeout' => 300,
'category' => 'sss',
'keyword' => '<string>',
'subarea' => '<string>',
'sort' => 'newest',
'postal' => '<string>',
'lat' => 0,
'lon' => 0,
'radius' => 1,
'min_price' => 1,
'max_price' => 1,
'free' => false,
'titles_only' => false,
'has_image' => false,
'posted_today' => false,
'hide_duplicates' => false,
'crypto_ok' => false,
'delivery_available' => false,
'language' => [
],
'condition' => [
],
'make_model' => '<string>',
'min_auto_year' => 1,
'max_auto_year' => 1,
'min_auto_miles' => 1,
'max_auto_miles' => 1,
'min_monthly_payment' => 1,
'max_monthly_payment' => 1,
'transmission' => [
],
'drivetrain' => [
],
'fuel_type' => [
],
'title_status' => [
],
'body_type' => [
],
'paint' => [
],
'cylinders' => [
],
'min_engine_displacement_cc' => 1,
'max_engine_displacement_cc' => 1,
'street_legal' => false,
'motorcycle_motor' => [
],
'motorcycle_type' => [
],
'min_boat_length' => 1,
'max_boat_length' => 1,
'min_year_manufactured' => 1,
'max_year_manufactured' => 1,
'boat_propulsion' => [
],
'boat_type' => [
],
'min_bedrooms' => 1,
'max_bedrooms' => 1,
'min_bathrooms' => 1,
'max_bathrooms' => 1,
'min_sqft' => 1,
'max_sqft' => 1,
'housing_features' => [
],
'rent_period' => [
],
'housing_type' => [
],
'laundry' => [
],
'parking' => [
],
'employment_type' => [
],
'is_internship' => false,
'is_nonprofit' => false,
'is_telecommuting' => false,
'lost_or_found' => [
],
'event_types' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/craigslist/postings/search"
payload := strings.NewReader("{\n \"area\": \"<string>\",\n \"count\": 5000,\n \"timeout\": 300,\n \"category\": \"sss\",\n \"keyword\": \"<string>\",\n \"subarea\": \"<string>\",\n \"sort\": \"newest\",\n \"postal\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"radius\": 1,\n \"min_price\": 1,\n \"max_price\": 1,\n \"free\": false,\n \"titles_only\": false,\n \"has_image\": false,\n \"posted_today\": false,\n \"hide_duplicates\": false,\n \"crypto_ok\": false,\n \"delivery_available\": false,\n \"language\": [],\n \"condition\": [],\n \"make_model\": \"<string>\",\n \"min_auto_year\": 1,\n \"max_auto_year\": 1,\n \"min_auto_miles\": 1,\n \"max_auto_miles\": 1,\n \"min_monthly_payment\": 1,\n \"max_monthly_payment\": 1,\n \"transmission\": [],\n \"drivetrain\": [],\n \"fuel_type\": [],\n \"title_status\": [],\n \"body_type\": [],\n \"paint\": [],\n \"cylinders\": [],\n \"min_engine_displacement_cc\": 1,\n \"max_engine_displacement_cc\": 1,\n \"street_legal\": false,\n \"motorcycle_motor\": [],\n \"motorcycle_type\": [],\n \"min_boat_length\": 1,\n \"max_boat_length\": 1,\n \"min_year_manufactured\": 1,\n \"max_year_manufactured\": 1,\n \"boat_propulsion\": [],\n \"boat_type\": [],\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"min_bathrooms\": 1,\n \"max_bathrooms\": 1,\n \"min_sqft\": 1,\n \"max_sqft\": 1,\n \"housing_features\": [],\n \"rent_period\": [],\n \"housing_type\": [],\n \"laundry\": [],\n \"parking\": [],\n \"employment_type\": [],\n \"is_internship\": false,\n \"is_nonprofit\": false,\n \"is_telecommuting\": false,\n \"lost_or_found\": [],\n \"event_types\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/craigslist/postings/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"area\": \"<string>\",\n \"count\": 5000,\n \"timeout\": 300,\n \"category\": \"sss\",\n \"keyword\": \"<string>\",\n \"subarea\": \"<string>\",\n \"sort\": \"newest\",\n \"postal\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"radius\": 1,\n \"min_price\": 1,\n \"max_price\": 1,\n \"free\": false,\n \"titles_only\": false,\n \"has_image\": false,\n \"posted_today\": false,\n \"hide_duplicates\": false,\n \"crypto_ok\": false,\n \"delivery_available\": false,\n \"language\": [],\n \"condition\": [],\n \"make_model\": \"<string>\",\n \"min_auto_year\": 1,\n \"max_auto_year\": 1,\n \"min_auto_miles\": 1,\n \"max_auto_miles\": 1,\n \"min_monthly_payment\": 1,\n \"max_monthly_payment\": 1,\n \"transmission\": [],\n \"drivetrain\": [],\n \"fuel_type\": [],\n \"title_status\": [],\n \"body_type\": [],\n \"paint\": [],\n \"cylinders\": [],\n \"min_engine_displacement_cc\": 1,\n \"max_engine_displacement_cc\": 1,\n \"street_legal\": false,\n \"motorcycle_motor\": [],\n \"motorcycle_type\": [],\n \"min_boat_length\": 1,\n \"max_boat_length\": 1,\n \"min_year_manufactured\": 1,\n \"max_year_manufactured\": 1,\n \"boat_propulsion\": [],\n \"boat_type\": [],\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"min_bathrooms\": 1,\n \"max_bathrooms\": 1,\n \"min_sqft\": 1,\n \"max_sqft\": 1,\n \"housing_features\": [],\n \"rent_period\": [],\n \"housing_type\": [],\n \"laundry\": [],\n \"parking\": [],\n \"employment_type\": [],\n \"is_internship\": false,\n \"is_nonprofit\": false,\n \"is_telecommuting\": false,\n \"lost_or_found\": [],\n \"event_types\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/craigslist/postings/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"area\": \"<string>\",\n \"count\": 5000,\n \"timeout\": 300,\n \"category\": \"sss\",\n \"keyword\": \"<string>\",\n \"subarea\": \"<string>\",\n \"sort\": \"newest\",\n \"postal\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"radius\": 1,\n \"min_price\": 1,\n \"max_price\": 1,\n \"free\": false,\n \"titles_only\": false,\n \"has_image\": false,\n \"posted_today\": false,\n \"hide_duplicates\": false,\n \"crypto_ok\": false,\n \"delivery_available\": false,\n \"language\": [],\n \"condition\": [],\n \"make_model\": \"<string>\",\n \"min_auto_year\": 1,\n \"max_auto_year\": 1,\n \"min_auto_miles\": 1,\n \"max_auto_miles\": 1,\n \"min_monthly_payment\": 1,\n \"max_monthly_payment\": 1,\n \"transmission\": [],\n \"drivetrain\": [],\n \"fuel_type\": [],\n \"title_status\": [],\n \"body_type\": [],\n \"paint\": [],\n \"cylinders\": [],\n \"min_engine_displacement_cc\": 1,\n \"max_engine_displacement_cc\": 1,\n \"street_legal\": false,\n \"motorcycle_motor\": [],\n \"motorcycle_type\": [],\n \"min_boat_length\": 1,\n \"max_boat_length\": 1,\n \"min_year_manufactured\": 1,\n \"max_year_manufactured\": 1,\n \"boat_propulsion\": [],\n \"boat_type\": [],\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"min_bathrooms\": 1,\n \"max_bathrooms\": 1,\n \"min_sqft\": 1,\n \"max_sqft\": 1,\n \"housing_features\": [],\n \"rent_period\": [],\n \"housing_type\": [],\n \"laundry\": [],\n \"parking\": [],\n \"employment_type\": [],\n \"is_internship\": false,\n \"is_nonprofit\": false,\n \"is_telecommuting\": false,\n \"lost_or_found\": [],\n \"event_types\": []\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"posting_id": 123,
"@type": "CraigslistPostingCard",
"posting_title": "<string>",
"alias": "<string>",
"url": "<string>",
"price": 123,
"price_string": "<string>",
"currency": "<string>",
"monthly_payment_string": "<string>",
"created_at": 123,
"category_id": 123,
"category_alias": "<string>",
"category": "<string>",
"location": {
"@type": "CraigslistPostingLocation",
"area_id": 123,
"area_alias": "<string>",
"subarea_alias": "<string>",
"neighborhood": "<string>",
"lat": 123,
"lon": 123
},
"image": "<string>",
"images": [],
"image_count": 0,
"bedrooms": 123,
"sqft": 123,
"auto_miles": 123,
"salary": "<string>",
"company": "<string>",
"job_title": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"open_house_dates": [],
"event_dates": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}/craigslist
/craigslist/postings/search
Search Craigslist postings in any of its regional sites: for each result returns title, price, posting date, location with coordinates, images and category-specific details such as odometer, bedrooms, square footage, salary or event dates. Supports the full filter surface of the site, including vehicle, motorcycle, boat, housing, job, gig and event facets.
Price: 20 credits per 360 results
POST
/
api
/
craigslist
/
postings
/
search
/craigslist/postings/search
curl --request POST \
--url https://api.anysite.io/api/craigslist/postings/search \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"area": "<string>",
"count": 5000,
"timeout": 300,
"category": "sss",
"keyword": "<string>",
"subarea": "<string>",
"sort": "newest",
"postal": "<string>",
"lat": 0,
"lon": 0,
"radius": 1,
"min_price": 1,
"max_price": 1,
"free": false,
"titles_only": false,
"has_image": false,
"posted_today": false,
"hide_duplicates": false,
"crypto_ok": false,
"delivery_available": false,
"language": [],
"condition": [],
"make_model": "<string>",
"min_auto_year": 1,
"max_auto_year": 1,
"min_auto_miles": 1,
"max_auto_miles": 1,
"min_monthly_payment": 1,
"max_monthly_payment": 1,
"transmission": [],
"drivetrain": [],
"fuel_type": [],
"title_status": [],
"body_type": [],
"paint": [],
"cylinders": [],
"min_engine_displacement_cc": 1,
"max_engine_displacement_cc": 1,
"street_legal": false,
"motorcycle_motor": [],
"motorcycle_type": [],
"min_boat_length": 1,
"max_boat_length": 1,
"min_year_manufactured": 1,
"max_year_manufactured": 1,
"boat_propulsion": [],
"boat_type": [],
"min_bedrooms": 1,
"max_bedrooms": 1,
"min_bathrooms": 1,
"max_bathrooms": 1,
"min_sqft": 1,
"max_sqft": 1,
"housing_features": [],
"rent_period": [],
"housing_type": [],
"laundry": [],
"parking": [],
"employment_type": [],
"is_internship": false,
"is_nonprofit": false,
"is_telecommuting": false,
"lost_or_found": [],
"event_types": []
}
'import requests
url = "https://api.anysite.io/api/craigslist/postings/search"
payload = {
"area": "<string>",
"count": 5000,
"timeout": 300,
"category": "sss",
"keyword": "<string>",
"subarea": "<string>",
"sort": "newest",
"postal": "<string>",
"lat": 0,
"lon": 0,
"radius": 1,
"min_price": 1,
"max_price": 1,
"free": False,
"titles_only": False,
"has_image": False,
"posted_today": False,
"hide_duplicates": False,
"crypto_ok": False,
"delivery_available": False,
"language": [],
"condition": [],
"make_model": "<string>",
"min_auto_year": 1,
"max_auto_year": 1,
"min_auto_miles": 1,
"max_auto_miles": 1,
"min_monthly_payment": 1,
"max_monthly_payment": 1,
"transmission": [],
"drivetrain": [],
"fuel_type": [],
"title_status": [],
"body_type": [],
"paint": [],
"cylinders": [],
"min_engine_displacement_cc": 1,
"max_engine_displacement_cc": 1,
"street_legal": False,
"motorcycle_motor": [],
"motorcycle_type": [],
"min_boat_length": 1,
"max_boat_length": 1,
"min_year_manufactured": 1,
"max_year_manufactured": 1,
"boat_propulsion": [],
"boat_type": [],
"min_bedrooms": 1,
"max_bedrooms": 1,
"min_bathrooms": 1,
"max_bathrooms": 1,
"min_sqft": 1,
"max_sqft": 1,
"housing_features": [],
"rent_period": [],
"housing_type": [],
"laundry": [],
"parking": [],
"employment_type": [],
"is_internship": False,
"is_nonprofit": False,
"is_telecommuting": False,
"lost_or_found": [],
"event_types": []
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
area: '<string>',
count: 5000,
timeout: 300,
category: 'sss',
keyword: '<string>',
subarea: '<string>',
sort: 'newest',
postal: '<string>',
lat: 0,
lon: 0,
radius: 1,
min_price: 1,
max_price: 1,
free: false,
titles_only: false,
has_image: false,
posted_today: false,
hide_duplicates: false,
crypto_ok: false,
delivery_available: false,
language: [],
condition: [],
make_model: '<string>',
min_auto_year: 1,
max_auto_year: 1,
min_auto_miles: 1,
max_auto_miles: 1,
min_monthly_payment: 1,
max_monthly_payment: 1,
transmission: [],
drivetrain: [],
fuel_type: [],
title_status: [],
body_type: [],
paint: [],
cylinders: [],
min_engine_displacement_cc: 1,
max_engine_displacement_cc: 1,
street_legal: false,
motorcycle_motor: [],
motorcycle_type: [],
min_boat_length: 1,
max_boat_length: 1,
min_year_manufactured: 1,
max_year_manufactured: 1,
boat_propulsion: [],
boat_type: [],
min_bedrooms: 1,
max_bedrooms: 1,
min_bathrooms: 1,
max_bathrooms: 1,
min_sqft: 1,
max_sqft: 1,
housing_features: [],
rent_period: [],
housing_type: [],
laundry: [],
parking: [],
employment_type: [],
is_internship: false,
is_nonprofit: false,
is_telecommuting: false,
lost_or_found: [],
event_types: []
})
};
fetch('https://api.anysite.io/api/craigslist/postings/search', 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.anysite.io/api/craigslist/postings/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'area' => '<string>',
'count' => 5000,
'timeout' => 300,
'category' => 'sss',
'keyword' => '<string>',
'subarea' => '<string>',
'sort' => 'newest',
'postal' => '<string>',
'lat' => 0,
'lon' => 0,
'radius' => 1,
'min_price' => 1,
'max_price' => 1,
'free' => false,
'titles_only' => false,
'has_image' => false,
'posted_today' => false,
'hide_duplicates' => false,
'crypto_ok' => false,
'delivery_available' => false,
'language' => [
],
'condition' => [
],
'make_model' => '<string>',
'min_auto_year' => 1,
'max_auto_year' => 1,
'min_auto_miles' => 1,
'max_auto_miles' => 1,
'min_monthly_payment' => 1,
'max_monthly_payment' => 1,
'transmission' => [
],
'drivetrain' => [
],
'fuel_type' => [
],
'title_status' => [
],
'body_type' => [
],
'paint' => [
],
'cylinders' => [
],
'min_engine_displacement_cc' => 1,
'max_engine_displacement_cc' => 1,
'street_legal' => false,
'motorcycle_motor' => [
],
'motorcycle_type' => [
],
'min_boat_length' => 1,
'max_boat_length' => 1,
'min_year_manufactured' => 1,
'max_year_manufactured' => 1,
'boat_propulsion' => [
],
'boat_type' => [
],
'min_bedrooms' => 1,
'max_bedrooms' => 1,
'min_bathrooms' => 1,
'max_bathrooms' => 1,
'min_sqft' => 1,
'max_sqft' => 1,
'housing_features' => [
],
'rent_period' => [
],
'housing_type' => [
],
'laundry' => [
],
'parking' => [
],
'employment_type' => [
],
'is_internship' => false,
'is_nonprofit' => false,
'is_telecommuting' => false,
'lost_or_found' => [
],
'event_types' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/craigslist/postings/search"
payload := strings.NewReader("{\n \"area\": \"<string>\",\n \"count\": 5000,\n \"timeout\": 300,\n \"category\": \"sss\",\n \"keyword\": \"<string>\",\n \"subarea\": \"<string>\",\n \"sort\": \"newest\",\n \"postal\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"radius\": 1,\n \"min_price\": 1,\n \"max_price\": 1,\n \"free\": false,\n \"titles_only\": false,\n \"has_image\": false,\n \"posted_today\": false,\n \"hide_duplicates\": false,\n \"crypto_ok\": false,\n \"delivery_available\": false,\n \"language\": [],\n \"condition\": [],\n \"make_model\": \"<string>\",\n \"min_auto_year\": 1,\n \"max_auto_year\": 1,\n \"min_auto_miles\": 1,\n \"max_auto_miles\": 1,\n \"min_monthly_payment\": 1,\n \"max_monthly_payment\": 1,\n \"transmission\": [],\n \"drivetrain\": [],\n \"fuel_type\": [],\n \"title_status\": [],\n \"body_type\": [],\n \"paint\": [],\n \"cylinders\": [],\n \"min_engine_displacement_cc\": 1,\n \"max_engine_displacement_cc\": 1,\n \"street_legal\": false,\n \"motorcycle_motor\": [],\n \"motorcycle_type\": [],\n \"min_boat_length\": 1,\n \"max_boat_length\": 1,\n \"min_year_manufactured\": 1,\n \"max_year_manufactured\": 1,\n \"boat_propulsion\": [],\n \"boat_type\": [],\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"min_bathrooms\": 1,\n \"max_bathrooms\": 1,\n \"min_sqft\": 1,\n \"max_sqft\": 1,\n \"housing_features\": [],\n \"rent_period\": [],\n \"housing_type\": [],\n \"laundry\": [],\n \"parking\": [],\n \"employment_type\": [],\n \"is_internship\": false,\n \"is_nonprofit\": false,\n \"is_telecommuting\": false,\n \"lost_or_found\": [],\n \"event_types\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/craigslist/postings/search")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"area\": \"<string>\",\n \"count\": 5000,\n \"timeout\": 300,\n \"category\": \"sss\",\n \"keyword\": \"<string>\",\n \"subarea\": \"<string>\",\n \"sort\": \"newest\",\n \"postal\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"radius\": 1,\n \"min_price\": 1,\n \"max_price\": 1,\n \"free\": false,\n \"titles_only\": false,\n \"has_image\": false,\n \"posted_today\": false,\n \"hide_duplicates\": false,\n \"crypto_ok\": false,\n \"delivery_available\": false,\n \"language\": [],\n \"condition\": [],\n \"make_model\": \"<string>\",\n \"min_auto_year\": 1,\n \"max_auto_year\": 1,\n \"min_auto_miles\": 1,\n \"max_auto_miles\": 1,\n \"min_monthly_payment\": 1,\n \"max_monthly_payment\": 1,\n \"transmission\": [],\n \"drivetrain\": [],\n \"fuel_type\": [],\n \"title_status\": [],\n \"body_type\": [],\n \"paint\": [],\n \"cylinders\": [],\n \"min_engine_displacement_cc\": 1,\n \"max_engine_displacement_cc\": 1,\n \"street_legal\": false,\n \"motorcycle_motor\": [],\n \"motorcycle_type\": [],\n \"min_boat_length\": 1,\n \"max_boat_length\": 1,\n \"min_year_manufactured\": 1,\n \"max_year_manufactured\": 1,\n \"boat_propulsion\": [],\n \"boat_type\": [],\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"min_bathrooms\": 1,\n \"max_bathrooms\": 1,\n \"min_sqft\": 1,\n \"max_sqft\": 1,\n \"housing_features\": [],\n \"rent_period\": [],\n \"housing_type\": [],\n \"laundry\": [],\n \"parking\": [],\n \"employment_type\": [],\n \"is_internship\": false,\n \"is_nonprofit\": false,\n \"is_telecommuting\": false,\n \"lost_or_found\": [],\n \"event_types\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/craigslist/postings/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"area\": \"<string>\",\n \"count\": 5000,\n \"timeout\": 300,\n \"category\": \"sss\",\n \"keyword\": \"<string>\",\n \"subarea\": \"<string>\",\n \"sort\": \"newest\",\n \"postal\": \"<string>\",\n \"lat\": 0,\n \"lon\": 0,\n \"radius\": 1,\n \"min_price\": 1,\n \"max_price\": 1,\n \"free\": false,\n \"titles_only\": false,\n \"has_image\": false,\n \"posted_today\": false,\n \"hide_duplicates\": false,\n \"crypto_ok\": false,\n \"delivery_available\": false,\n \"language\": [],\n \"condition\": [],\n \"make_model\": \"<string>\",\n \"min_auto_year\": 1,\n \"max_auto_year\": 1,\n \"min_auto_miles\": 1,\n \"max_auto_miles\": 1,\n \"min_monthly_payment\": 1,\n \"max_monthly_payment\": 1,\n \"transmission\": [],\n \"drivetrain\": [],\n \"fuel_type\": [],\n \"title_status\": [],\n \"body_type\": [],\n \"paint\": [],\n \"cylinders\": [],\n \"min_engine_displacement_cc\": 1,\n \"max_engine_displacement_cc\": 1,\n \"street_legal\": false,\n \"motorcycle_motor\": [],\n \"motorcycle_type\": [],\n \"min_boat_length\": 1,\n \"max_boat_length\": 1,\n \"min_year_manufactured\": 1,\n \"max_year_manufactured\": 1,\n \"boat_propulsion\": [],\n \"boat_type\": [],\n \"min_bedrooms\": 1,\n \"max_bedrooms\": 1,\n \"min_bathrooms\": 1,\n \"max_bathrooms\": 1,\n \"min_sqft\": 1,\n \"max_sqft\": 1,\n \"housing_features\": [],\n \"rent_period\": [],\n \"housing_type\": [],\n \"laundry\": [],\n \"parking\": [],\n \"employment_type\": [],\n \"is_internship\": false,\n \"is_nonprofit\": false,\n \"is_telecommuting\": false,\n \"lost_or_found\": [],\n \"event_types\": []\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"posting_id": 123,
"@type": "CraigslistPostingCard",
"posting_title": "<string>",
"alias": "<string>",
"url": "<string>",
"price": 123,
"price_string": "<string>",
"currency": "<string>",
"monthly_payment_string": "<string>",
"created_at": 123,
"category_id": 123,
"category_alias": "<string>",
"category": "<string>",
"location": {
"@type": "CraigslistPostingLocation",
"area_id": 123,
"area_alias": "<string>",
"subarea_alias": "<string>",
"neighborhood": "<string>",
"lat": 123,
"lon": 123
},
"image": "<string>",
"images": [],
"image_count": 0,
"bedrooms": 123,
"sqft": 123,
"auto_miles": 123,
"salary": "<string>",
"company": "<string>",
"job_title": "<string>",
"start_date": "<string>",
"end_date": "<string>",
"open_house_dates": [],
"event_dates": []
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Minimum string length:
1Required range:
1 <= x <= 10000Required range:
20 <= x <= 1500Available options:
newest, oldest, price_asc, price_desc, distance, relevance, upcoming Required range:
-90 <= x <= 90Required range:
-180 <= x <= 180Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Available options:
all, owner, dealer Available options:
afrikaans, catala, dansk, deutsch, english, espanol, suomi, francais, italiano, nederlands, norsk, portugues, svenska, filipino, turkce, chinese, arabic, japanese, korean, russian, vietnamese Available options:
new, like_new, excellent, good, fair, salvage Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Available options:
manual, automatic, other Available options:
fwd, rwd, 4wd Available options:
gas, diesel, hybrid, electric, other Available options:
clean, salvage, rebuilt, parts_only, lien, missing Available options:
bus, convertible, coupe, hatchback, minivan, offroad, pickup, sedan, truck, suv, wagon, van, other Available options:
black, blue, brown, green, grey, orange, purple, red, silver, white, yellow, custom Available options:
3, 4, 5, 6, 8, 10, 12, other Required range:
x >= 0Required range:
x >= 0Available options:
gas, electric, other Available options:
adventure, bobber, cafe_racer, chopper, cruiser, dirtbike, dual_sport, scooter_moped, sport_bike, sport_touring, standard, touring, trike, other Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Available options:
sail, power, human Available options:
commercial_boat, houseboat, kayak_canoe_sup, luxury_classic_yacht, personal_watercraft, pontoon_boat, powerboat, rowboat, rowing_shell, sailboat, ski_boat, small_outboard_fishing, trawler, other Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Available options:
cats_ok, dogs_ok, furnished, no_smoking, wheelchair_accessible, air_conditioning, ev_charging, no_broker_fee, no_application_fee, private_room, private_bath Available options:
daily, weekly, monthly Available options:
all, within_30_days, beyond_30_days Available options:
apartment, condo, cottage_cabin, duplex, flat, house, in_law, loft, townhouse, manufactured, assisted_living, land Available options:
in_unit, hookups, in_building, on_site, none Available options:
carport, attached_garage, detached_garage, off_street, street, valet, none Available options:
full_time, part_time, contract, employees_choice Available options:
all, paid, unpaid Available options:
lost, found Available options:
food_drink, competition, tech, festival, sustainability, art_film, singles, fitness_health, career, outdoor, sale, free, music, charitable, dance, kid_friendly, literary Response
Successful Response
Show child attributes
Show child attributes