Ninja Scraper: Saudi Restaurants and Delivery avatar

Ninja Scraper: Saudi Restaurants and Delivery

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Ninja Scraper: Saudi Restaurants and Delivery

Ninja Scraper: Saudi Restaurants and Delivery

Find restaurants that deliver to any point in Saudi Arabia on Ninja. Get branch name, open status, rating, delivery distance and fee, running offers and matching dishes. Filter by cuisine, free delivery, top rating or offers, or open a branch.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Happy Endpoint

Happy Endpoint

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

What this Actor does

This Actor reads the restaurant listings of Ninja, a food delivery service in Saudi Arabia, for any delivery point you give as coordinates. Each row is one restaurant branch with its name, open or closed status, rating and vote count, distance, delivery time, delivery fee, running offers and the dishes that match your keyword. Search by keyword, cuisine, free delivery, top rating or offers, open one branch by its number or page link, look up the closest branch of a chain, or list the cuisines, filters and delivery information for a spot.

The data is what Ninja shows to any visitor who enters a delivery point: restaurants, ratings, delivery fees and times, offers and matching dishes.

Use cases

  • Compare delivery fees and waiting times of restaurants across neighborhoods of one city.
  • Track which restaurants run offers or free delivery and how long the offers last.
  • Map the restaurant supply by cuisine for a district before opening a new kitchen.
  • Check the ratings and vote counts of every branch of a chain.
  • Find which restaurants serve a dish by searching the dish name.

How to use

  1. Open the Actor's input form in Apify Console, or prepare a JSON input for the API.
  2. Pick an operation: each one is a different kind of request to Ninja.
  3. Set maxItems to the number of results you need. It is the only quantity setting; paging is handled for you.
  4. Start the run. The results land in the run's dataset, where you can download them as JSON, CSV, Excel and other formats, or read them through the Apify API.

This is the example input, the one the input form starts with:

{
"operation": "restaurants",
"maxItems": 10,
"latitude": 24.7136,
"longitude": 46.6753,
"language": "en"
}

Input

FieldTypeDescriptionUsed by
operationstringWhich data to fetch. Each option is one kind of request.all operations
maxItemsintegerThe most results to return. The run stops once it has this many.all operations
urlstringA link copied from your browser: one restaurant page for Restaurant by page link, or a browse or cuisine page for Restaurants by page link.Restaurant by page link, Restaurants by page link
branchIdstringThe number of one restaurant branch, as search rows return it in branch_id. A restaurant link ends with it.Restaurant branch details
restaurantIdstringThe number of a restaurant brand or chain, found inside the restaurant block of a search row. It is not a branch ID.Closest branch of a chain
latitudenumberNorth-south position of the place where food would be delivered, as a decimal number. Distances, fees and waiting times depend on it.Delivery info at a point, Cuisines, Search restaurants, Restaurant branch details, Closest branch of a chain, Restaurant by page link, Restaurants by page link
longitudenumberEast-west position of the delivery place, as a decimal number. Keep it identical in all operations of one task.Delivery info at a point, Cuisines, Search restaurants, Restaurant branch details, Closest branch of a chain, Restaurant by page link, Restaurants by page link
languagestringThe language of names and labels in the rows. Leave it empty for English.Delivery info at a point, Cuisines, Restaurant filters, Search restaurants, Restaurant branch details, Closest branch of a chain, Restaurant by page link, Restaurants by page link
querystringA restaurant, brand or dish to look for. Arabic and English text both work. Matching dishes are listed on the row.Search restaurants, Restaurants by page link
cuisineIdsstringCuisine numbers from Cuisines, with a comma between them. A restaurant that serves any of them is kept.Search restaurants
freeDeliverybooleanKeep only restaurants that deliver without a fee at the moment.Search restaurants
hasActiveDiscountbooleanKeep only restaurants that have at least one offer running now.Search restaurants
topRatedbooleanKeep only restaurants that Ninja marks as top rated. The bar is set by the site.Search restaurants

Output

Every row holds the run's own fields first (operation, scrapedAt and sourceUrl), then the core fields id, url, title, price, currency, location, which are empty when the source has no such value, and then every field of the source item as Ninja returns it. The dataset has an overview view and one view per operation.

Run the Actor with the prefilled input to see a sample of the output.

Pricing

This Actor uses pay-per-event pricing: a start fee of $0.002 for each run, plus $0.002 for each result in the dataset. Every operation is priced the same way.

OperationStart fee per runPrice per result
Delivery info at a point$0.002$0.002
Cuisines$0.002$0.002
Restaurant filters$0.002$0.002
Search restaurants$0.002$0.002
Restaurant branch details$0.002$0.002
Closest branch of a chain$0.002$0.002
Restaurant by page link$0.002$0.002
Restaurants by page link$0.002$0.002

Worked examples for one run:

ResultsTotal cost
10$0.022
100$0.202
750$1.502

Invalid input, a not-found answer or an internal error adds no charge of its own: such a run pays the start fee plus only the results it delivered before it stopped (none for invalid input). To cap what one run may cost, set the maximum cost per run when you start it.

Limits and tips

  • One run returns at most 750 results; the input form allows no higher maxItems.
  • Set maxItems to what you need: you pay per result, and a smaller run finishes sooner.
  • A request that matches nothing ends with an empty dataset and costs only the start fee.
  • Results depend on the delivery point. Use the same latitude and longitude for every operation of one task, or the fees and waiting times will not match.
  • Only Saudi Arabia is served. A spot outside the service area returns no restaurants.
  • A search page holds 15 branches and a run reads at most 50 pages, so one search returns up to 750 branches.
  • Search by page link takes pages of the Ninja site only. A single branch page belongs to Restaurant by page link, and a listing page to Restaurants by page link.

Resume a run that stopped at your cost limit

If you set a maximum cost per run and a run reaches it, the run stops early. To get the rest, resurrect the run in Apify Console, or through the API, with a higher limit. The Actor resumes where it stopped: results already in the dataset are not fetched or charged again, and the run still ends at maxItems. Resurrecting can charge the start fee again.

Running without input

The example input above is also this Actor's example run input. Apify's API documents that a run started with no input at all uses the example run input: Search restaurants, at most 10 results, which costs at most $0.022 (the start fee plus 10 results). For your own runs, always send an input with the fields you need.

FAQ

Do I need an account on Ninja?

No. The Actor reads public data, so an Apify account is all you need.

How do I get the data into my own tools?

Download the dataset from the run's page, or read it through the Apify API and its integrations.

What is the difference between a branch ID and a brand ID?

A branch is one restaurant location and a brand is the chain behind it. The two numbers are separate series, so a branch ID cannot be used where a brand ID is asked for.

Which coordinates should I use?

The point where the food would be delivered, for example the middle of a neighborhood. Rows show the distance from that point and the delivery fee for it.

How do I find the cuisine numbers?

Run Cuisines for your point. Each row has an id and a name, and you pass the ids to Search restaurants as Cuisine IDs, with commas between them.

Are menus included?

Only the dishes that match your keyword are listed on a search row. Full menus are not part of this Actor.

More Ninja Actors

This is the only Ninja Actor in this collection for now.

Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by Ninja. All trademarks belong to their owners.

This Actor collects data that Ninja shows publicly. None of the fields it returns is marked as personal data. Personal data is protected by laws such as the GDPR in the EU. Collect and use it only when you have a lawful reason, keep only what you need, and do not use it for unsolicited messages. If you are unsure, ask a lawyer.