Downloads HTML and PDF versions of Ford Service Manuals from PTS.
Bought a 72-hour subscription to Ford's service manuals and want to save it permanently? Here's the repo for you.
These manuals are copyrighted by Ford, so don't share them!
Getting this to work currently requires some knowledge of browser DevTools. If you're not sure how to use them, ask a friend who does.
This script uses playwright
, a headless browser interop library, to save documents
as PDF files rather than raw HTML (this way files include images).
While this script has been verified to work on Windows natively (see issue #6), it's recommended to run it in WSL. Running in WSL makes installing things like Git and Node far easier.
WSL is a way to run Linux (Ubuntu is recommended for this project) in tandem with Windows. It's far faster than a virtual machine but still uses the real Linux kernel. Learn more and see install instructions here.
corepack
)corepack enable
git clone https://github.com/iamtheyammer/fetch-ford-service-manuals.git
, and enter the repository's directory (likely with cd fetch-ford-service-manuals
)
git pull
to get up to date!git pull
does not say Already up to date.
, run the next 2 steps to ensure your dependencies are up-to-date.git stash
, git pull
, then git stash apply
to un-stash your files.yarn
to download dependenciesyarn playwright-setup
to download and set up PlaywrightThese instructions are intended for Chrome or Chrome-based browsers.
templates/
, make a copy of cookieString.txt.template
, and name it cookieString.txt
cookieString.txt
templates/
, make a copy of params.json.template
, and name it params.json
.If your vehicle was made BEFORE 2003, use these instructions.
This script requires some data about your car that's not available in the PTS GUI in order to fetch the correct manual.
https://www.fordservicecontent.com/Ford_Content/PublicationRuntimeRefreshPTS//publication/prod_1_3_372022/TreeAndCover/workshop/32/~WSLL/{some numbers here}
. It should look similar to the request in this photo.templates/params.json
, and copy/paste information from that request into the values of the JSON .workshop
field.
If your vehicle was made IN 2003 or LATER, use these instructions.
templates/params.json
, and change only:
workshop.modelYear
to the year of your carpre_2003.alphabeticalIndexURL
to the URL you copied in step 2https://www.fordservicecontent.com/Ford_Content/PublicationRuntimeRefreshPTS//wiring/TableofContent
(there are query params at the end, that's ok). It should look similar to the request in this photo.
TableOfContent
, not TableOfContent
s
environment
,bookType
, and languageCode
query params into .wiring
in params.json
.
WiringBookTitle
or WiringBookCode
are still missing, you may need to select you may need to select a wiring manual. After selecting a manual, you'll find these in another request to https://www.fordtechservice.dealerconnection.com/wiring/TableOfContents
(with some query params at the end):booktitle
→ WiringBookTitle
book
→ WiringBookCode
params.json
as best as you can.params.json
.cookieString.txt.template
called cookieString.txt
if you haven't already.https://www.fordtechservice.dealerconnection.com/wiring/TableOfContents
(there are query params at the end, that's ok).
TableOfContent
s
, not TableOfContent
cookieString.txt
file.
cookieString.txt
should not include Cookie:
, for example.)cookieString.txt
.To download the manual as PDFs, run yarn start -c templates/params.json -s templates/cookieString.txt -o /directory/where/you/want/the/downloaded/manual/
. You should see output that looks like this.
Before manuals start to download, the bot will validate that your cookies are correctly set up by attempting to open the PTS site in the background. While you can skip this check, there is a good chance that skipping it (with --noCookieTest
) will result in an error later on.
Make sure that the directory for the downloaded manual is empty-- it'll have lots of subfolders.
You can get more param information by running yarn start --help
. Notably, --saveHTML
will save .html
files along with the .pdf
files downloaded by default, and --ignoreSaveErrors
will continue downloading manuals if an error is encountered, skipping the file with an error.
It can take a little while! On a fast computer with a fast internet connection, and, more importantly, a fast disk drive, over 15 minutes to download the manuals for the 2005 Taurus. Be patient!
Also, the resulting folder is pretty sizeable. The folder for the 2005 Taurus was about 300mb, and the F150 folder was a couple gigabytes.
Having issues? See Common Issues or FAQ.
This bot downloads the entire workshop manual and all wiring diagrams for the vehicle you set up.
Wiring diagrams will be in outputpath/Wiring
. There's also a toc.json
file with the table of contents for the wiring diagrams.
If you have a Wiring/Connector Views
folder, you've got a special file in there: Connectors.csv
.
It tells you where to find every connector in the car, and where it is in the Component Location Charts.
Open it in Excel or Google Sheets to see the data. Here's a quick example:
Connector ID | Connector | Connector Location Views Page Number | Grid Reference | Location in Vehicle |
---|---|---|---|---|
C168A | 10R80 Transmission (2.7L) | 29 | F5 | Transmission |
C1840 | Line Pressure Control (LPC) solenoid | 34 | E8 | Inside transmission |
Wiring/Connector Location Views
)The folder structure in the output directory will mimic the structure on PTS, so if a file has a path like 1: General Information -> 00: Service Information -> 100-00 General Information -> About this Manual
, it will be in the folder outputpath/1: General Information/00: Service Information/100-00 General Information/About this Manual.pdf
.
The cover.html
file contains the book's cover and a table of contents laid out in bullet points. The tree of those bullet points directly maps to the file structure of the downloaded manual. Note that some characters are not allowed in file/folder names, so characters like slashes, colons, and more are replaced with dashes when saving.
The toc.json
file contains the computer-readable table of contents, with the name mapped to the "document number", which is used to fetch the PDF.
Most operating systems limit filenames to 255 bytes (not 255 characters). For filenames over 200 characters (which are fairly rare), the downloader will truncate the name, then add (docID truncated)
onto the end.
If you're having trouble finding a document with a long name, search for it in toc.json
, where it will be a key with a value. That value is the docID
which will be in the filename.
Vehicles from 2002 or older have a different, harder-to-fetch structure in the manual, so this tool just uses the alphabetical index. This means the output is a bit different; you'll simply get a flat structure with all pages in the manual in the output folder you specified.
You can easily browse the manual by opening outputpath/AA_Table_Of_Contents.html
-- all the links work except for the letters at the top.
There are also a few special files:
AA_Table_Of_Contents.html
is a special, processed table of contents where all the links work! Open it in your browser to navigate the manual.AAA_alphabeticalIndex.json
is a JSON file with all the links in the alphabetical index. It's not as useful as the table of contents, but it's there if you need it. It's a result of the processing script.AAA_originalTableOfContents.html
is the original table of contents, so the links don't work. It's there if you need it. It's a result of the processing script.These files are prefixed with AAA
so they appear at the top of the file list in most file browsers.
When the script starts, it tries to sign in to PTS to verify that your cookies are working. If this fails, you may not be able to fetch manuals.
Try to re-collect cookies and make sure you're using the correct ones. If you're 100% sure that your cookies are correct, you can add --noCookieTest
to the command.
Well, it looks like your subscription has expired. You'll need to renew it to download manuals.
This check can also be skipped with --noCookieTest
, but without a subscription you won't be able to download manuals.
...
not found in cookie string. This may affect functionality.The script auto-checks your cookie file against a list of expected cookies. If it can't find one of the expected cookies, it'll warn you (note that the bot does not stop if this prints out).
If you see this message and the script starts to download manuals, let it go-- it's just a warning. If you see the message and everything downloads just fine, please open a GitHub issue so I can fix it for others.
If you're having issues, try re-collecting your cookies.
ERR_HTTP2_PROTOCOL_ERROR
This can either mean that your cookies are invalid or that Ford (actually Akamai) has detected we're using a headless browser (Playwright).
First, try re-collecting your cookies and trying again. If you still have issues, reach out.
ERR_BAD_RESPONSE
This usually means that one of the fields in your params.json
file is incorrect. Check that all the fields are correct, and if you're still having issues, open a GitHub issue. (This sometimes happens as Ford updates their site.)
All the ones I've tested. Just for fun, I tried:
All worked flawlessly!
To re-collect cookies, follow the instructions in this set of instructions, making sure you:
Cookie:
part of the header, if you copied itRaw
toggle at the top right of Request Headers
;
between the first paste and second pasteIf you're still having trouble, reach out.
Probably! We've had success all across North America, South America, Europe, and Australia.
While the script is in English (meaning all messages that print out will be in English), it will download manuals in the language specified in params.json
. Note that Ford must have the manual available in the requested language.
To download manuals in a specific language, change your PTS language, re-collect all parameters, and run the download again.
As Ford continues to change how manuals are accessed, this project requires continuous maintenance.
If this project was helpful to you, you can support this project on GitHub sponsors (click the "Sponsor" button at the top of the page), buy me a coffee, or just share it!
Contributions via pull requests are also more than welcomed. For the highest chance of getting your PR merged, please:
node_modules
folder)yarn format
before submitting for an easy reviewThese are not requirements-- I can always help you with these things-- but they make the process faster.
I'm generally happy to help, but I am a full-time university student and this is a pure passion project. I also don't keep a PTS subscription on hand for testing (it's pretty expensive long-term!).
For help, either open a GitHub issue or join the Discord server. To help with 99% of issues, I'll need the error you're getting along with your params.json
and cookieString.txt
files. There's a method on the Discord server to send them privately.
I wanted to have the manual for my car, and I bought the subscription hoping to download a PDF, so that's exactly what I did!
Two reasons. Firstly, I don't want to DDoS Ford (they also have Akamai in front of this, and a ton of parallel requests would absolutely trigger it and get us blocked). Secondly, it was easier to code synchronously.