
Tripadvisor Scraper
Pricing
$3.00 / 1,000 results

Tripadvisor Scraper
This unofficial Tripadvisor API is a data extraction tool able to get data on hotels, restaurants, things to do, vacation rentals, attractions, tours, and public trips. Get pricing, contact details, amenities, awards, ratings, and more. Download your data in Excel, JSON, CSV, and other formats.
4.8 (9)
Pricing
$3.00 / 1,000 results
113
Monthly users
371
Runs succeeded
>99%
Response time
1.3 days
Last modified
9 days ago
Permission Denied when using API but ok using tasks
Closed
I get error executing this actor via api: ApifyApiError: Insufficient permissions for the Actor. Make sure you're passing a correct API token and that it has the required permissions. clientMethod: ActorClient.start statusCode: 403 type: insufficient-permissions attempt: 1 httpMethod: post path: /v2/acts/maxcopell~tripadvisor/runs

Hi, thanks for opening this issue!
Can you share the code for your integration? This looks like an issue with the token... Are you using the correct Personal API token from the https://console.apify.com/settings/integrations tab? The 403
error is often thrown if you've just forgot to include the token.
Thanks!
ratan
import { ApifyClient } from 'apify-client'; import fs from 'fs'; import path from 'path'; import XLSX from 'xlsx';
// Initialize the ApifyClient with your Apify API token const client = new ApifyClient({ token: process.env.APIFY_API_TOKEN, });
// Prepare Actor input const input = { "locationFullName": "São Paulo", "maxItemsPerQuery": 15, "includeTags": true, "includeNearbyResults": false, "includeAttractions": true, "includeRestaurants": true, "includeHotels": true, "includeVacationRentals": false, "checkInDate": "", "checkOutDate": "", "includePriceOffers": false, "includeAiReviewsSummary": false, "language": "pt", "currency": "BRL" };
// Run the Actor and wait for it to finish try { const run = await client.actor("maxcopell/tripadvisor").call(input);
1// Fetch Actor results from the run's dataset (if any) 2console.log('Results from dataset'); 3console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`); 4const { items } = await client.dataset(run.defaultDatasetId).listItems(); 5items.forEach((item) => { 6 const timestamp = new Date().toISOString().replace(/[-:]/g, '').replace('T', '_').split('.')[0]; 7 const jsonFileName = `export/json/${item.id}_${timestamp}.json`; 8 const excelFileName = `export/excel/${item.id}_${timestamp}.xlsx`; 9 10 // Create directories if they do not exist 11 if (!fs.existsSync('expo... [trimmed]

Thanks for providing the code! It looks good, but the process.env.APIFY_API_TOKEN
value could still be undefined
, which would cause the 403 error.
Could you try attaching this at the start of the file?
1if (!process.env.APIFY_API_TOKEN) { 2 throw new Error('process.env.APIFY_API_TOKEN is not defined'); 3}
This will fail the code if the, if the variable is undefined. Let me know the outcome :)
ratan
You nailed it.
I haven't initialized the .env
Thanks!!
Pricing
Pricing model
Pay per resultThis Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for each dataset of 1,000 items in the Actor outputs.
Price per 1,000 items
$3.00