# Tripadvisor Scraper
[![Oxylabs promo code](https://user-images.githubusercontent.com/129506779/250792357-8289e25e-9c36-4dc0-a5e2-2706db797bb5.png)](https://oxylabs.go2cloud.org/aff_c?offer_id=7&aff_id=877&url_id=112)
[<u>Tripadvisor Scraper API</u>](https://oxylabs.io/products/scraper-api/web/tripadvisor) is an advanced web data extraction solution with an emphasis on scale, saved time, and instant results. The following introduces the basics of getting started with Tripadvisor Scraper API.
## How it works
You can provide us with any Tripadvisor URL, and we will return the results right away.
### Python input code example
The code example below shows an input code to be provided to the API.
```python
import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'universal',
'url': 'https://www.tripadvisor.com/Restaurants-g60763-New_York_City_New_York.html',
'user_agent_type': 'desktop',
'geo_location': 'United States'
}
# Get a response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'),
json=payload
)
# Instead of response with job status and results url, this will return the
# JSON response with results.
pprint(response.json())
```
### Output example
```json
{
"results": [
{
"content": "<!doctype html>
<html lang="en">
<head>...</script></body>
</html>
",
"created_at": "2023-07-26 12:07:08",
"job_id": "7089939195182992385",
"page": 1,
"status_code": 200,
"updated_at": "2023-07-26 12:07:41",
"url": "https://www.tripadvisor.com/Restaurants-g60763-New_York_City_New_York.html"
}
]
}
```
Tripadvisor Scraper API automates the bulk of the underlying processes and ensures a block-free experience.
If you have any questions, please [email us](mailto:support@oxylabs.io) or drop a message via the live chat on our homepage.
```
Raw data
{
"_id": null,
"home_page": "https://oxylabs.io/products/scraper-api/web/tripadvisor",
"name": "Tripadvisor-scraper",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "tripadvisor-scraper,tripadvisor-scrape,scrape-tripadvisor,",
"author": "Oxylabs",
"author_email": "marketing@oxylabs.io",
"download_url": "https://files.pythonhosted.org/packages/f4/c5/814148bb2c03fdb337fa8833855a4dcc23bf4091fcb5bb123d62044a608f/Tripadvisor-scraper-0.1.0.tar.gz",
"platform": null,
"description": "# Tripadvisor Scraper\n\n[![Oxylabs promo code](https://user-images.githubusercontent.com/129506779/250792357-8289e25e-9c36-4dc0-a5e2-2706db797bb5.png)](https://oxylabs.go2cloud.org/aff_c?offer_id=7&aff_id=877&url_id=112)\n\n[<u>Tripadvisor Scraper API</u>](https://oxylabs.io/products/scraper-api/web/tripadvisor) is an advanced web data extraction solution with an emphasis on scale, saved time, and instant results. The following introduces the basics of getting started with Tripadvisor Scraper API.\n\n## How it works\n\nYou can provide us with any Tripadvisor URL, and we will return the results right away.\n\n### Python input code example\n\nThe code example below shows an input code to be provided to the API.\n\n```python\nimport requests\nfrom pprint import pprint\n\n# Structure payload.\npayload = {\n 'source': 'universal',\n 'url': 'https://www.tripadvisor.com/Restaurants-g60763-New_York_City_New_York.html',\n 'user_agent_type': 'desktop',\n 'geo_location': 'United States'\n}\n\n# Get a response.\nresponse = requests.request(\n 'POST',\n 'https://realtime.oxylabs.io/v1/queries',\n auth=('USERNAME', 'PASSWORD'),\n json=payload\n)\n\n# Instead of response with job status and results url, this will return the\n# JSON response with results.\npprint(response.json())\n```\n### Output example\n\n```json\n{\n \"results\": [\n {\n \"content\": \"<!doctype html>\n<html lang=\"en\">\n<head>...</script></body>\n</html>\n\",\n \"created_at\": \"2023-07-26 12:07:08\",\n \"job_id\": \"7089939195182992385\",\n \"page\": 1,\n \"status_code\": 200,\n \"updated_at\": \"2023-07-26 12:07:41\",\n \"url\": \"https://www.tripadvisor.com/Restaurants-g60763-New_York_City_New_York.html\"\n }\n ]\n}\n```\n\nTripadvisor Scraper API automates the bulk of the underlying processes and ensures a block-free experience. \n\nIf you have any questions, please [email us](mailto:support@oxylabs.io) or drop a message via the live chat on our homepage.\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The basics of forming an input code for scraping travel industry pages with Tripadvisor Scraper API + an example of results.",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/oxylabs/tripadvisor-scraper/issues",
"Documentation": "https://developers.oxylabs.io/scraper-apis/web-scraper-api",
"Homepage": "https://oxylabs.io/products/scraper-api/web/tripadvisor",
"Source": "https://github.com/oxylabs/tripadvisor-scraper"
},
"split_keywords": [
"tripadvisor-scraper",
"tripadvisor-scrape",
"scrape-tripadvisor",
""
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8c8c27405d446e51341f99d1450d17ac9d2a983cedc26798aef0f35086312089",
"md5": "8865ceb6f600000b9ebe37fee6d9787d",
"sha256": "471171586fbfb1f4b3b7f3f37b41b1d49a6d7f481814354531aba8d37f997c0d"
},
"downloads": -1,
"filename": "Tripadvisor_scraper-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8865ceb6f600000b9ebe37fee6d9787d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2292,
"upload_time": "2023-12-19T07:27:26",
"upload_time_iso_8601": "2023-12-19T07:27:26.594992Z",
"url": "https://files.pythonhosted.org/packages/8c/8c/27405d446e51341f99d1450d17ac9d2a983cedc26798aef0f35086312089/Tripadvisor_scraper-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f4c5814148bb2c03fdb337fa8833855a4dcc23bf4091fcb5bb123d62044a608f",
"md5": "56c8ab3f933cbe7f1148367240e88581",
"sha256": "a2cfcab381c464543ef15599a7b4a88d7200424745f79b614574ffa2585b9a0b"
},
"downloads": -1,
"filename": "Tripadvisor-scraper-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "56c8ab3f933cbe7f1148367240e88581",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2303,
"upload_time": "2023-12-19T07:27:27",
"upload_time_iso_8601": "2023-12-19T07:27:27.857509Z",
"url": "https://files.pythonhosted.org/packages/f4/c5/814148bb2c03fdb337fa8833855a4dcc23bf4091fcb5bb123d62044a608f/Tripadvisor-scraper-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-19 07:27:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "oxylabs",
"github_project": "tripadvisor-scraper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tripadvisor-scraper"
}