Skip to content

Instantly share code, notes, and snippets.

@shiondev
shiondev / view_crawl_sample
Created March 18, 2014 20:13
View a crawl
{
"id": 25,
"name": "name_of_crawl",
"user": "your_user_token",
"user_agent": "008",
"app": "full_page_content.js",
"urllist": "name_of_url_list",
"data": "undefined",
"max_depth": 1,
"max_urls": 10,
@shiondev
shiondev / get_crawl_results_sample
Last active August 29, 2015 13:57
Get download link for results of crawl
[
"http://datafiniti-voltron-results.s3.amazonaws.com/12/34.txt?AWSAccessKeyId=xxx&Signature=yyy&Expires=1395859223"
]
@shiondev
shiondev / upload_80app_sample
Last active August 29, 2015 13:57
Upload 80app sample
> curl -X PUT https://your_user_token:@api.80legs.com/v2/apps/full_page_content.js -H "Content-Type: application/octet-stream" --data-binary @/path/to/full_page_content.js -i
@shiondev
shiondev / sample_datafiniti_business_json.json
Last active August 29, 2015 13:58
A sample business record from Datafiniti in JSON
{
"total": 19894,
"records": [
{
"address": "222 Merchandise Mart Plz Ste 111",
"categories": [
"Coffeehouses",
"Grocery Stores",
"Coffee & Tea Shops",
"Restaurants"
@shiondev
shiondev / 80legs_result_sample.json
Last active August 23, 2019 15:50
80legs result sample
[
{
"url": "http://www.80legs.com/",
"result": "your_data_here"
},
{
"url": "http://www.techcrunch.com/",
"result": "your_data_here"
}
]
@shiondev
shiondev / datafiniti_preview
Created May 20, 2014 14:37
Sample Datafiniti preview call
> curl -X GET "https://your_token:@api.datafiniti.net/v2/data/locations/preview?view=location_json&q=name:%22Kagan%20Creative%22"
@shiondev
shiondev / datafiniti_download
Created May 20, 2014 14:40
Sample Datafiniti download
> curl -X GET "https://your_token:@api.datafiniti.net/v2/data/locations/download?view=location_json&q=postalcode:78701"
@shiondev
shiondev / tutorials_countURLs
Last active August 29, 2015 14:01
Tutorials > Counting How Many URLs a Website Has
> curl -X PUT https://your_user_token:@api.80legs.com/v2/urllists/crawlURLs-1 -H "Content-Type: application/octet-stream" --data-binary "[\"http://www.80legs.com\"]" -i
> curl -X PUT https://your_user_token:@api.80legs.com/v2/crawls/countURLs -H "Content-Type: application/json" -d "{\"app\": \"CrawlInternalLinks.js\", \"urllist\": \"crawlURLs-1\", \"max_depth\": 20, \"max_urls\": 100000 }" -i
> curl -X GET https://your_user_token:@api.80legs.com/v2/crawls/countURLs
@shiondev
shiondev / tutorials_downloadHTML
Created May 22, 2014 17:17
Tutorials > Downloading the HTML For Every Page on a Group of Websites
> curl -X PUT https://your_user_token:@api.80legs.com/v2/urllists/downloadwebsites-1 -H "Content-Type: application/octet-stream" --data-binary "[\"http://www.80legs.com\",\"https://www.datafiniti.net\",\"http://www.harkavagrant.com\"]" -i
> curl -X PUT https://your_user_token:@api.80legs.com/v2/crawls/downloadwebsites -H "Content-Type: application/json" -d "{\"app\": \"CrawlInternalLinks.js\", \"urllist\": \"downloadwebsites-1\", \"max_depth\": 20, \"max_urls\": 100000 }" -i
> curl -X GET https://your_user_token:@api.80legs.com/v2/results/downloadwebsites
@shiondev
shiondev / download_updated_data
Created May 30, 2014 20:33
Download updated data
> curl -X GET "https://your_token:@api.datafiniti.net/v2/data/locations/download?view=location_json&q=postalcode:78701 AND dateUpdated:[2014-01-01 TO *]"